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!

8
  • 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
    Oct 8, 2014 at 6:57
  • 4
    Did you restart sshd?
    – Jan
    Oct 8, 2014 at 7:04
  • 1
    AFTER making the sshd_config changes did you restart the sshd service? Changes do not take effect until a restart.
    – mdpc
    Oct 8, 2014 at 7:05
  • @Jan Yes I've restarted SSHD using the command service sshd restart
    – Mark
    Oct 8, 2014 at 9:02
  • @mdpc yep I've restarted SSHD
    – Mark
    Oct 8, 2014 at 9:02

0

You must log in to answer this question.

Browse other questions tagged .