I'm trying to configure single sign on for SSHD using SSSD on an active directory domain but it does not appear to be working. When I ssh into the same server it prompts for password login although as far as i can tell everything is configured correctly. The system appears to have all the kerberos ticket it needs:
[root@DeskTest2 ]# klist -ke /etc/krb5.keytab Keytab name: FILE:/etc/krb5.keytab KVNO Principal ---- -------------------------------------------------------------------------- 2 host/desktest2.ad.domain.com@AD.domain.COM (des-cbc-crc) 2 host/desktest2.ad.domain.com@AD.domain.COM (des-cbc-md5) 2 host/desktest2.ad.domain.com@AD.domain.COM (aes128-cts-hmac-sha1-96) 2 host/desktest2.ad.domain.com@AD.domain.COM (aes256-cts-hmac-sha1-96) 2 host/desktest2.ad.domain.com@AD.domain.COM (arcfour-hmac) 2 host/DESKTEST2@AD.domain.COM (des-cbc-crc) 2 host/DESKTEST2@AD.domain.COM (des-cbc-md5) 2 host/DESKTEST2@AD.domain.COM (aes128-cts-hmac-sha1-96) 2 host/DESKTEST2@AD.domain.COM (aes256-cts-hmac-sha1-96) 2 host/DESKTEST2@AD.domain.COM (arcfour-hmac) 2 DESKTEST2$@AD.domain.COM (des-cbc-crc) 2 DESKTEST2$@AD.domain.COM (des-cbc-md5) 2 DESKTEST2$@AD.domain.COM (aes128-cts-hmac-sha1-96) 2 DESKTEST2$@AD.domain.COM (aes256-cts-hmac-sha1-96) 2 DESKTEST2$@AD.domain.COM (arcfour-hmac) [user@ad.domain.com@DeskTest2 ~]$ klist Ticket cache: KEYRING:persistent:1328401110:krb_ccache_8qaV38N Default principal: user@AD.domain.COM Valid starting Expires Service principal 10/16/2016 13:56:23 10/16/2016 23:56:23 krbtgt/AD.domain.COM@AD.domain.COM renew until 10/23/2016 13:56:23
sshd_config that was changed from default centos 7 config
# Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #KerberosGetAFSToken no #KerberosUseKuserok yes # GSSAPI options GSSAPIAuthentication yes GSSAPICleanupCredentials yes #GSSAPIStrictAcceptorCheck yes GSSAPIKeyExchange yes #GSSAPIEnablek5users no
Example ssh login
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password debug3: authmethod_lookup gssapi-keyex debug3: remaining preferred: gssapi-with-mic,publickey,keyboard-interactive,password debug3: authmethod_is_enabled gssapi-keyex debug1: Next authentication method: gssapi-keyex debug1: No valid Key exchange context debug2: we did not send a packet, disable method debug3: authmethod_lookup gssapi-with-mic debug3: remaining preferred: publickey,keyboard-interactive,password debug3: authmethod_is_enabled gssapi-with-mic debug1: Next authentication method: gssapi-with-mic debug2: we sent a gssapi-with-mic packet, wait for reply debug1: Delegating credentials debug1: Delegating credentials debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug2: we sent a gssapi-with-mic packet, wait for reply debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug2: we sent a gssapi-with-mic packet, wait for reply debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug2: we sent a gssapi-with-mic packet, wait for reply debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug2: we did not send a packet, disable method debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password
The user supports Kerberos AES 256 bit within active directory and DESKTEST2 is configured to allow delegation to any service (Kerberos only) within active directory. Let me know if you nee any additional information.