sshd_config settings not taking effect

1

I've been trying to configure SSH public key authentication for non-interactive login for sftp and for that to work, I know I need to have the following settings:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile  .ssh/authorized_keys

I've already added the generated public key to the authorized_keys on the remote server and when I try to run a ssh command or sftp command. I'm still prompted for my password. I'm seeing the following when I run the ssh command with -vvv

2014-10-08 10:05:37  debug(2) pid=23469 Querying server for authmethod - publickey
2014-10-08 10:05:37  debug(2) pid=23469 Query for publickey failed -- publickey disabled.
2014-10-08 10:05:37  debug(2) pid=23469 Querying server for authmethod - password

I take it that the sshd_config settings isn't taking effect? Can someone advice me on this?

Thanks!

Mark

Posted 2014-10-08T06:32:12.903

Reputation: 11

You should check server logs, on Debian / Ubuntu /var/log/auth.log CentOS Redhat I think /var/log/secure it's probably a ownership / permissions issue on the .ssh/authorized_keys – squareborg – 2014-10-08T06:57:22.753

3Did you restart sshd? – Jan – 2014-10-08T07:04:36.417

AFTER making the sshd_config changes did you restart the sshd service? Changes do not take effect until a restart. – mdpc – 2014-10-08T07:05:13.383

@Jan Yes I've restarted SSHD using the command service sshd restart – Mark – 2014-10-08T09:02:38.247

@mdpc yep I've restarted SSHD – Mark – 2014-10-08T09:02:56.157

@Shutupsquare The only meaningful message on my /var/log/secure is that the connection is closed. What permission should my authorized keys file be? Mine is currently set to 600 – Mark – 2014-10-08T09:03:21.790

Would like to see the actual file (sshd_config). That helps. Causes that you can find to this problem range from not uncommenting the properties to actually having edited the wrong file (ssh_config). – user766353 – 2016-02-05T23:00:26.493

No answers