I have a program (which I cannnot modify) which runs for > 1 day. I want to start it via SSH in GNU screen and detach then. The remote is a Fedora system using a Kerberos-based file server on which I'm not root. But after a day my renewable ticket expires so the program cannot write to the file server anymore. It seems that the ticket is not renewed automatically as it is when I'm a local user on that machine. The output of klist is attached below. How can I automatically renew my ticket during the one week period so the program can write to the file server after >1 day?

    Ticket cache: KEYRING:persistent:20282:20282
Default principal: user@host

Valid starting       Expires              Service principal
22.10.2016 11:10:19  23.10.2016 11:09:49  nfs/server@host
        renew until 29.10.2016 11:09:50
  • 2
    How about krenew? That is, run your program using krenew -K 60 program... in the screen session? – Nominal Animal Oct 22 '16 at 11:06
  • I really wonder why exactly it's behaving differently, I doubt it's explicitly checking for screen. – phk Oct 22 '16 at 18:48
  • @Nominal Animal: Using krenew works like a charm. Thanks! – e-dschungel Oct 24 '16 at 21:17
  • 1
    @phk: No the program is not checking for screen. I found the answer in the krenew manpage: If a command is given, krenew makes a copy of the ticket cache and creates a private ticket cache just for that command, thus isolating it from later destruction of the original ticket cache. This allows krenew to maintain authentication for a command even if, for example, the user running the command logs out and OpenSSH destroys their original ticket cache. – e-dschungel Oct 24 '16 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.