#SSH connection refused to HA after adding public key

1 messages · Page 1 of 1 (latest)

fringe mango
#

I have a raspberry pi zero 2 W that I'm using a to run a raspberry pi camera with HA/MQTT support called picam2ctrl.
One of the features of the program is that it can automatically copy image and video files to the ssh server that HA is running.

I have done the following steps to try to get an ssh connection between the client pi and HA working:

  1. Generate a public and private key using this command on the client device:
    ssh-keygen -t ECDSA -b 521
    and entered blank passphrase for the generated keys.
  2. Installed the terminal & ssh official HA addon
  3. Copy the result of the below command into the authorised keys field on the SSH addon configuration page:
    cat ~/.ssh/id_ecdsa.pub
  4. Save the addon config and restart it.

However when I try to enter ssh root@homeassistant.local from the client device, I get this error:
ssh: connect to host homeassistant.local port 22: Connection refused

I also tried to use this command to copy the key to HA:
ssh-copy-id -i ~/.ssh/id_ecdsa.pub root@homeassistant.local
However it also failed with the same error:
/usr/bin/ssh-copy-id: ERROR: ssh: connect to host homeassistant.local port 22: Connection refused

How can I setup the ssh connection between the client and HA correctly?

hollow python
#

You need to ssh to the port that’s setup in the terminal/advanced ssh addon.