Remember Kerberos tickets after reboot

I need to use Kerberos to connect to my network at work. The built-in kinit and ssh in Lion work fine for me. However, I need to get a new ticket and re-enter my password every time I restart the computer. Is there a way to make it remember the ticket after reboots (until it actually expires)?


Solution 1:

By default, the kerberos ticket cache is placed under /tmp, which is cleared out on reboot. You can specify your own location for the ticket cache, in a location safer for long term storage, by passing the "-c" flag to kinit, and setting KRB5CCNAME to point to the same location, so ssh will use it.

$ kinit -c ~username/mykrbcache
$ export KRB5CCNAME=~username/mykrbcache
$ ssh kerberoshost
...
$ reboot
...
$ export KRB5CCNAME=~username/mykrbcache
$ ssh kerberoshost
...