- Permissions
authorized_keys and authorized_keys2 600 .ssh 700 Home Directory 711 Keys (id_dsa,id_rsa) 600 Public Keys (id_dsa.pub,id_rsa.pub) 644 - Account locked.
You created an account, created a key, got everything in the right location but you cannot ssh in using the key.
If you used useradd and didn't set a password, then the acount is locked. Edit /etc/shadow and change
user:!!: to user:*: - SSH Permit
You forgot that you have an AllowUsers in /etc/ssh/sshd_config
Add the user to AllowUsers
AllowUsers previous users this user
Note: this allows the users: previous; users; this; and user access to the machine
You forgot that you have a DenyUsers in /etc/ssh/sshd_config
Remove the user from DenyUsers
Note: if this is your issue, you've been smoking too much weed - Still doesn't work, you get key-error or protocol mismatch.
- You are using an rsa1 key on a host that supports only ssh2 (rsa and dsa keys).
Note to self: Get with it buddy, ssh1, "what's with you man?" - You are using a dsa or rsa key on a host that supports only ssh1 (rsa1).
- You are using an rsa1 key on a host that supports only ssh2 (rsa and dsa keys).
I've wasted enough time with these seemingly simple tasks to warrant a quick post. The problem is that you've created keys, put the relevant files all over the place, but nothing seems to be working.