Setting up SSH

Having troubles, I put this but it gives error

{
“authorized_keys”: [
“ssh-rsaAAAB3NzaC1yc2EAAAABJQAAAQEAn+v1W9QFF8EsyLz0V+saSRUpoMAFwFb6/fZFfas03kLMDijxyhHKlxybi9jfO9k0+kuPD5vVH3nAdGxgcqMmrp2lgz6rNiT31zapq6c5h8z0Q7GG86jkqkereh57T72UsqydLHzIBRCQjDqe1fz1NEQafCRdMwZRI6/nTxxxxxxxxxxxxxxxCzk/ZZRdCUggi4UX0IYc/2Um0m/vgubtHyR6Lbp+i/JJenNMA5nGGS7dnLNdW7yGqgy5r40/z1Nv4zDQT9Gft2xVpv2sAwC+oN/ICEutHL/C9iflSMmZMCBl5s2ifawxKYSj8pfWu8UPg3czVgsGhPWKw== rsa-key-20170726”
]
}

1 Like

when I log with putty I can put the login (pi) and I receive this error

DIsconnected: no supported authentication methods available (server sent publickey.keyboard-interactive)

Follow this YT clip and you will get it to work.

7 Likes

OMG thanks, I would never figure it by myself … soooo complicated

2 Likes

can someone help me do this on a MAC…

follow the directions at below website for “Generating an SSH Key”
https://docs.joyent.com/public-cloud/getting-started/ssh-keys/generating-an-ssh-key-manually/manually-generating-your-ssh-key-in-mac-os-x

next go to to folder where your SSH keys are said to be saved.
right click on id_rsa.pub and open with text editor.
copy whole text inside.
follow directions from vid in previous post to paste into SSH window
once done, go to Terminal type ssh root@pi_IP_Address
follow prompts from there.

4 Likes

Thank you so much for the video link. That was very helpful.

Thanks for the link “Generating an SSH Key”

For anyone stumbling on this and still being stuck after following the instructions above:

The login user is root (not your homeassistant login)

so, you’ll need to:

## do this:
ssh [email protected]
## not this:
ssh [email protected]

Also, on a Mac, cat ~/.ssh/id_rsa.pub | pbcopy is a quick way to get the key onto your clipboard for pasting.

5 Likes

For anyone still reading this in 2024 and are beginners to this certain aspect of software I made these instructions work. There are some small changes due to updates. Here is a copy and paste that I left in the video with time stamps.

Works great with current as of March 09 2024 with small changes. Pros may not need the help but it’s good for people like me. 3:30 No quotation marks (speech marks) needed around the pasted keys. 4:47 It’s now in folders Connections > SSH > Auth > Connections 5:21 I also changed the user name from root to something of my choosing as recommended by the program. I just made sure to add it in the SSH configuration settings on my home assistant under settings for ssh and command program that I use.

that is crazy, you need to do it EXACTLY like in the video, each character, only then it will work. Only putty keys will work. What a sh…

This is regarding ‘Advanced SSH & Web Terminal’ from the ‘Settings-> Add-ons.’

After installing ‘Advanced SSH & Web Terminal’ and having its page open, start by clicking the ‘Start at Boot’ and "Show in Sidebar,’ and then going to the Configuration tab and adding a user name and password, go back to the Info tab and start or restart ‘Advanced SSH & Web Terminal.’ After a few moments it should have started, go to the Terminal in the Side bar and open up the terminal. Go to the .ssh directory (‘cd .ssh’ (it has to have the period)) and type ‘ssh-keygen’ to generate your private and public keys. You don’t need putty. You don’t need to generate the keys on your Windows, Mac, or Linux machine. You don’t need to paste it from anywhere.

Now, if only they’d impliment the ability to log into HA from a desktop using the passkeys. My desktop public key does show up the known_hosts file in the .ssh directory when I’ve used the ssh-copy-id from my desktop, but it doesn’t allow me to login without the password. Conversely, when I’ve used the ssh-copy-id (ssh-copy-id -i id_rsa.pub name@ipaddress) from the Terminal on HA, I can subsequently login to my desktop from HA without having to type the password. HA developers, please fix this!