Run kinit when needed?

Tony Nelson tonynelson at georgeanelson.com
Sat Nov 21 16:32:30 UTC 2009


On 09-11-21 06:45:40, Christoph Höger wrote:
> Hi,
> 
> I've been switched from keybased auth to kerberos on a university
> server (and things work fine), but running kinit manually every 
> morning or so is ... somewhat disturbing my workflow. Isn't there 
> something like "run kinit the first time when there is no ticket" 
> mode for ssh?

Well, maybe a shell alias would help out.  Use `klist -s` to see if 
kinit is needed, then do ssh.  Something like:

    $ alias ssh='klist -s || kinit ; ssh'

(I don't use Kerberos.  I just looked at `man kinit`, and then `man 
klist`.)

-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson at georgeanelson.com>
      '                              <http://www.georgeanelson.com/>





More information about the users mailing list