Server refused our key UBUNTU Solution

Server refused our key UBUNTU

After spending the last two hours working on this issue, I though it would be a good idea to post a solution.

Most online tutorials only refer to ssh_config instead of sshd_config.
Ubuntu SSH has two config files: ssh_config and sshd_config
#cd /etc/ssh/ reveals the following:

SOLUTION

I was making my changes to ssh_config but the active config file is sshd_config.

Do not forget to reload ssh after changing the sshd_config file.

sudo service reload ssh

If it is still not working :

Move your key to a different location.

Now why in the blue world do we have two SSH config files in UBUNTU.
Any idea?

Useful references
http://www.howtoforge.com/ssh_key_based_logins_putty
http://adamwright.wordpress.com/2011/05/16/ssh-error-server-refused-our-key-and-how-to-fix-it/

Let's share thisShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

2 comments Write a comment

  1. The reason that there are two SSH config files is, one is for the OpenSSH server the other is for the SSH client on the machine. That is why there is “d” after its the server or Deamon, to distinguish between the two.