Why is SSH password authentication a security risk?

There are pro’s and con’s for either pw or key-based authentication. In some cases, for example, key-based authentication is less secure than password authentication. In other cases, its pw-based that’s less secure. In some cases, one is more convenient, in others, less. It all boils down to this: When you do key-based authentication, you must … Read more

Why does my OpenSSH key fingerprint not match the AWS EC2 console keypair fingerprint?

AWS EC2 shows the SSH2 fingerprint, not the OpenSSH fingerprint everyone expects. It doesn’t say this in the UI. It also shows two completely different kinds of fingerprints depending on whether the key was generated on AWS and downloaded, or whether you uploaded your own public key. Fingerprints generated with ssh-keygen -l -f id_rsa will … Read more

What significance does the user/host at the end of an SSH public key file hold?

This field is a comment, and can be changed or ignored at will. It is set to user@host by default by ssh-keygen. The OpenSSH sshd(8) man page describes the format of a public key thus: Public keys consist of the following space-separated fields: options, keytype, base64-encoded key, comment. . . . The comment field is … Read more

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