I have followed the below steps to set up the Kerberos server for centos.
I am able to Generate TGT with kinit command. But when i try to ssh to the server, It is prompting for password.
/etc/krb5.conf
includedir /etc/krb5.conf.d/
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
dns_lookup_realm = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
default_realm = TEST.COM
default_ccache_name = KEYRING:persistent:%{uid}
[realms]
TEST.COM = {
kdc = vm.test.com
admin_server = vm.test.com
}
[domain_realm]
.test.com = TEST.COM
test.com = TEST.COM
Solved it. I was giving in the hostname in krb5.conf and not the fqdn of servers. :D