[Cialug] SSH Host Key Permissions

Nicolai nicolai-cialug at chocolatine.org
Fri Mar 22 20:37:02 UTC 2019


On Fri, Mar 22, 2019 at 09:05:33AM -0400, Todd Walton wrote:

> But I still can't SSH in. Here's the console output:

Try this, without changing or omitting anything.  From the console of
your server type this exactly and copy/paste the output:

rm -f /etc/ssh/ssh_host_*key*
ssh-keygen -A
ls -l /etc/ssh/ssh_host_*key*
for f in /etc/ssh/ssh_host_*pub; do ssh-keygen -lf $f; done


Instead of saying it works or doesn't work, please copy and paste all
output.  Don't worry, it won't reveal anything secret or private.

Then, on your laptop/desktop, remove from ~/.ssh/known_hosts any saved
pubkeys pertaining to the remote host you want to ssh into.

Then, on your laptop/desktop, ssh into your server.  Compare the public
key shown in the dialogue to the output you saw from the server console
when running ssh-keygen -lf on the server's ed25519 host pubkey.
Assuming they match, log in.

If this doesn't work, please copy and paste every single command you
typed, not just the one that immediately preceded failure.

Nicolai


More information about the Cialug mailing list