SSH onto Ubuntu box using RSA keys
- by jex
I recently installed OpenSSH on one of my Ubuntu machines and I've been running into problems getting it to use RSA keys.
I've generated the RSA key on the client (ssh-keygen), and appended the public key generated to both the /home/jex/.ssh/authorized_keys and /etc/ssh/authorized_keys files on the server.
However, when I try to login (ssh -o PreferredAuthorizations=publickey jex@host -v [which forces the use of public key for login]) I get the following output:
debug1: Host 'pentheon.local' is known and matches the RSA host key.
debug1: Found key in /home/jex/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
Banner message
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/jex/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/jex/.ssh/identity
debug1: Trying private key: /home/jex/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
I'm not entirely sure where I've gone wrong.
I am willing to post my /etc/ssh/sshd_config if needed.