How do I validate an RSA SSH public key file (id_rsa.pub)?

You can use ssh-keygen for this. Despite its name it can do many more things than generating keys: dennis@lightning:~$ ssh-keygen -l -f .ssh/id_rsa.pub 2048 68:df:b2:22:d8:43:5d:36:75:c1:d8:59:c0:8c:22:e8 Dennis Kaarsemaker (RSA) dennis@lightning:~$ ssh-keygen -l -f foo.txt foo.txt is not a public key file.

What’s the difference between authorized_keys and authorized_keys2?

In OpenSSH prior to version 3, the sshd man page used to say: The $HOME/.ssh/authorized_keys file lists the RSA keys that are permitted for RSA authentication in SSH protocols 1.3 and 1.5 Similarly, the $HOME/.ssh/authorized_keys2 file lists the DSA and RSA keys that are permitted for public key authentication (PubkeyAuthentication) in SSH protocol 2.0. The … Read more

“Add correct host key in known_hosts” / multiple ssh host keys per hostname?

get the rsa key of your server, where server_ip is your server’s IP address, such as 192.168.2.1: $ ssh-keyscan -t rsa server_ip Sample response: # server_ip SSH-2.0-OpenSSH_4.3 server_ip ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwH5EXZG… and on the client, copy the entire response line server_ip ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwH5EXZG…, and add this key to the bottom of your ~/.ssh/known_hosts file: server_ip ssh-rsa … Read more

we did not send a packet, disable method

There are many, many reasons why client-side debugging (ssh -vvv …) shows: Many of these are listed in the answers to SSH public key won’t send to server on Unix & Linux, but, unfortunately, the client does not give any indication as to which one applies. When I was struggling with this, my main problem was getting server-side logging/debugging … Read more

error code: 523