I am ssh'ing to a CentOS 7.2 server using public key authentication (from a Mac OS X bash session). I can successfully ssh using the centos user to the remote box, using the PEM key I have with the
-i argument when specifying
I would like to ssh with another user that exists on the remote host. I don't see any AllowUser or DenyUser rules in the sshd_config on the remote host. When I run
ssh -i mykey.pem -v auser@remotehost I get
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Both users exist in
/etc/passwd on the remote host. I don't understand why only the centos user can successfully ssh. In
/var/log/secure on the remote host I see
localhost sshd: error: AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys returned status 1.
The thing is, I see that same message for successful logins as well, in which case it's followed by
Accepted publickey for centos . . .