Thanks for the replies. I regards HA-blue as a bundle, HW & SW installed. As stated elsewhere, I only managed SSH through the terminal (add-on) within HA. That one stops when I stop HA (or likely more precisely, when stopping HA core also stops the UI)
I failed so far connecting SSH through PUTTY from elsewhere, connection steadfastly refused.
Samba works fine though, so its not a generic network issue. I suspect a setting in HA-blue that’s preventing external SSH, hence my expectation that the seller of a bundle provides minimum guidance or at least some contact.
not much configuration in SSH other than the public key (with and without the comment around it)
and putty neither (other than the private key file in SSH)
keys generated with puttygen
Type c from anywhere and then type “restart”. Select the “Restart server” option
Or again if you prefer the cli - ha core restart. Or ha core stop and then ha core start.
Neither of those are basic things. The SSH addons are only available to advanced users. Advanced users are kind of expected to know what they’re doing.
Why do you need SSH access anyway? Sounds like you already have Samba installed and so can edit your config. Restarting HA and rebooting the host are both options in the UI, there’s no reason you have to use the CLI for those.
He doesn’t want to restart core, he wants to stop core, play with his database, then start core. So none of the restart options are suitable. And once core is stopped you can’t use ui. His query boils down to whether the ssh addon continues to run when core is stopped. My experience is that the ssh and web terminal does continue to run when core is stopped.
Thanks @nickrout , you summarized it perfectly.
Samba keeps running when I stop HA and I’m confident so does SSH. But I still have not managed accessing SSH from my windows-putty and (re-)start HA core after a while of downtime other than cycle the power.
my SSH/Terminal add-on configuration
authorized_keys:
- >-
AAAAB3NzaC1yc2EA........6a50WohUjIl
- >-
---- BEGIN SSH2 PUBLIC KEY ---- Comment: "rsa-key-20220622"
AAAAB3NzaC1yc......26a50WohUjIl ---- END SSH2 PUBLIC
KEY ----
password: ''
apks: []
server:
tcp_forwarding: false
OK. Thankyou. Does the log for the addon tell you the RSA key has not been accepted? It did for me and I had to switch to using a ed25519 key (you can create in PuttyGen) I am using it in a secret in this format:
ssh_web_addon: ssh-ed25519 AAAAC…cJdmdCr ed25519-key
It won’t work with the rsa key unless a recent update restored that…
I did write about this recently in the thread here for the addon. See this post and the discussions prior to it in this thread Home Assistant Community Add-on: SSH & Web Terminal - #457 by DavidFW1960
I noticed that the “Terminal & SSH” and the “SSH & Web Terminal” are (similar but) different add-ons.
Maybe we (temporarily) remove the variable of auth key: Use the username + password challenge instead, and remove the auth key, at least to test that SSH itself being functional.
What does the log of the add-on say, when you try to connect from putty?
Is port 22 open on 192.168.0.2? nickrout has asked the same but I have not seen the answer.
The document of the “Terminal & SSH” specifically says, when you connect, “you end up in this add-on’s container”. So what exactly are you planning to do via SSH? Do you have a way to jump from the prompt of the container to the prompt of the HAOS??
And a couple of questions:
What do you mean by “stop HA”? How exactly did you “stop” your HA?
Where is this “elsewhere”? A different room in your house, different subnet, or outside of your home?
== EDIT: Mod has moved/split this thread to its independent thread, so not applicable any more == This thread is about metal boxes to run HA. But then since your “HA works fine and I got quite a few custom integrations working” and “Samba works fine”, it does feel more like a SW / config issue now. Do we consider we split the thread?
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
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.
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.