Home Assistant Blue start/stop / connect putty

Probably best to add the ssh discussion to @brun059 's thread on the same issue.

Thanks for asking the right questions. Looks like port 22 is closed on the HA-Blue bundle

C:\Users\bruno>curl -v telnet://192.168.0.2:22
*   Trying 192.168.0.2:22...
* connect to 192.168.0.2 port 22 failed: Connection refused
* Failed to connect to 192.168.0.2 port 22 after 2055 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 192.168.0.2 port 22 after 2055 ms: Connection refused

Log also says SSH port is disabled.

[cont-init.d] executing container initialization scripts...
[cont-init.d] apks.sh: executing... 
[cont-init.d] apks.sh: exited 0.
[cont-init.d] keygen.sh: executing... 
[13:21:06] INFO: Restoring host keys...
[cont-init.d] keygen.sh: exited 0.
[cont-init.d] profile.sh: executing... 
[cont-init.d] profile.sh: exited 0.
[cont-init.d] ssh.sh: executing... 
[13:21:06] INFO: Setup authorized_keys
[cont-init.d] ssh.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[13:21:06] INFO: Starting Web Terminal...
[2022/06/22 13:21:06:9020] N: ttyd 1.6.3-3e37e33 (libwebsockets 4.2.1-v4.2.1)
[2022/06/22 13:21:06:9021] N: tty configuration:
[2022/06/22 13:21:06:9021] N:   start command: tmux -u new -A -s homeassistant bash -l
[2022/06/22 13:21:06:9021] N:   close signal: SIGHUP (1)
[2022/06/22 13:21:06:9021] N:   terminal type: xterm-256color
[2022/06/22 13:21:06:9021] N: LWS: 4.2.1-v4.2.1, loglevel 7
[2022/06/22 13:21:06:9021] N: NET CLI SRV H1 H2 WS ConMon IPV6-off
[2022/06/22 13:21:06:9032] N:    /usr/lib/libwebsockets-evlib_uv.so
[2022/06/22 13:21:06:9093] N:  Using foreign event loop...
[2022/06/22 13:21:06:9093] N:  ++ [wsi|0|pipe] (1)
[2022/06/22 13:21:06:9094] N:  ++ [vh|0|netlink] (1)
[2022/06/22 13:21:06:9095] N:  ++ [vh|1|default||8099] (2)
[2022/06/22 13:21:06:9096] N: lws_socket_bind: nowsi: source ads 0.0.0.0
[2022/06/22 13:21:06:9096] N:  ++ [wsi|1|listen|default||8099] (2)
[2022/06/22 13:21:06:9096] N:  Listening on port: 8099
[13:21:07] WARNING: SSH port is disabled. Prevent start of SSH server.

Trying to use nc to open 22 failed, or at least I failed. .

Version	core-2022.6.7
Installation Type	Home Assistant OS
:
Operating System Version	5.15.45

Attempting to answer the other Qs

ha core stop in the terminal-addon (which then is the famous last command for “this terminal”)

windows PC, the same I connect to HA-Samba (same subnet etc.)

… you enabled the port by putting in 22 on the tcp section right?

Yeah does putty work when core is running?

Yes. All addons require you to type the port you want to give “External” access to. So if he leaves the port blank, it’s disabled. I put external in quotes because external does not mean “expose to the internet” it means “enable the port for your network to access it”.

Bruno - Reference your comment on 6/23, the port should be specified under the same config page, and further down - at least if you want to connect to port 22 of your 192.168.0.2.

putty of course tries connecting to port 22.

I tried both in the config of the SSH add-on, explicitly listing 22 and show disabled ports as well as the defaults. If you mean something else with “putting in 22 on the tcp section” then I’m clueless.

That screenshot shows it empty though.

Keep in mind, you have to restart the addon after making that change.

:grinning: :+1:, the 22 to the right fooled me. I thought that’s the active setting and left it as it is…
Never got the idea that I have to set / retype it explicitly. and was tinkering with show disabled ports on/off - only

Now it refuses the key but I guess the solution to this is from

Nope, that’s why you had to click ‘show disabled ports’. Cause it was disabled

So the problem wasn’t really that stopping core stopped ssh access, it was that ssh access wasn’t even enabled.

Sheeesh.

I can see how that would be confusing. I think I would have thought it was the default too.

Especially since the words say “Change the ports…” not “Add the ports”

But he has to click the button “show disabled ports” to even see that… that means it was disabled

If he’d explained the problem properly, given logs and config we could have got to the solution. Wooly and misleading questions generate wooly and misleading answers.

@petro could you please move all this OT stuff to @brun059 's thread here. Home Assistant Blue start/stop / connect putty

both, stopping core stopped the Terminal web-UI embedded in HA - and using alternative was blocked by me fooled by the 22/tcp not being the same as 22 enabled :wink:

The fact remains that you were never able to use putty, whether or not core was running. Failing to mention that led to a long thread about nothing.

1 Like

there are always different views, misunderstandings and opportunities for learning. Thanks for the help.

As a newbie I benefit a lot from the forum. I admit reading all the stuff more carefully would have avoided some loops. Installation is just no my thing. Hope I can give back sometime in areas I understand better such as datamodels, and algorithms. My only meaningful contribution so far was Utility Energy (daily delta) restarts with 0 zero, - #5 by brun059

1 Like

This thread is a fantastic example of the pains that I feel every time I try to do something more than absolutely basic happy path in HA. Updating the most used pieces of the UI to provide helpful information for a good user experience would avoid the confusion that is discussed in this thread.

The “Show disabled ports” section under Network settings is an example of the type of things that could be improved to help users who do not have years of HA tribal knowledge. It’s still unclear to me how that section works. More specifically, the default for the section is an unset toggle for “Show disabled ports” that when toggled on shows an empty text box that may or may not indicate that 22/tcp is the default value. So then let’s say that a value is included in that text box, that section now says “Change the ports on your host that are exposed by the add-on” followed by a port number followed by a toggled on value for “Show disabled ports”. In this case, what state are we now in? (Rhetorical question for illustration.) It’s like this in so many places, which invariably leads to a long goose chase that has threads like this one.

Some of us are paying monthly to support improvements, but this most core stuff continues to lie fallow while new features are added every month that are used by a tiny portion of users. So please, rather than blame those of us who are trying to ask questions for not asking the question in the precise words, please try to help us to ask the question properly. There are basic things that we don’t even know to specify, and if you can help us by asking more questions, then we’ll come up to speed and pay it forward rather that flip the table and leave. Thank you.

In his defense, he did say on at least two occasions in this thread that he could not connect using putty.

Thanks Thomas