I’m quite lazy, so I’m using the authorized_keys-thingie (I actually don’t know the real name, but I’m sure you know what I’m talking about
).
The reason for this post is a “feature” I just discovered today. Maybe it’s obvious for everybody (except me), but I was aware that newlines in the remote authorized_keys-file mattered. But they do! So please remember to put every entry in one (1) line only!
Before I did it I got the errors like:
debug1: Host '[host]' is known and matches the RSA host key. debug1: Found key in /home/[username]/.ssh/known_hosts:3 debug2: bits set: 524/1024 debug1: ssh_rsa_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/[username]/.ssh/id_rsa (0xXYZXYZXYZ) debug2: key: /home/[username]/.ssh/identity ((nil)) debug2: key: /home/[username]/.ssh/id_dsa ((nil)) debug1: Authentications that can continue: publickey,password debug3: start over, passed a different list publickey,password debug3: preferred gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering public key: /home/[username]/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply Connection closed by [IP of host] username@desktop:~$
