Passwordless authentication for SSH
-
Modify
~/.ssh/configto have a section like: -
Install the Kerberos client utilities:
- on Fedora:
sudo dnf install krb5-workstation - on Debian:
sudo apt install krb5-user - on macOS with Homebrew:
brew install krb5
- on Fedora:
-
Make sure your
sshclient itself is built with GSS-API support.The
GSSAPI*options above are only honoured by ansshthat was built against GSS-API. A client without it quietly ignores them and falls back to asking for your password, which looks just like Kerberos "not working".ssh -G discovery.dartmouth.edu | grep -i gssapiauthenticationprints the effective setting if your client understands the option, and nothing at all if it was built without GSS-API. (Do not test withssh -Q kex: GSS-API key exchange is a Debian/Fedora patch that upstream OpenSSH -- including Apple's and Homebrew's -- does not carry, so that check reports a missing feature on clients whereGSSAPIAuthenticationworks fine.)On Debian this now needs an extra package:
Debian is splitting GSS-API out of
openssh-client. As of Debian 13 (trixie)openssh-client-gssapiis still an empty package that only depends onopenssh-client, so installing it changes nothing yet, but its package description states that "future releases will remove GSS-API support from openssh-client, so users who need it should install this package". Debian 12 (bookworm) still ships GSS-API insideopenssh-client, so nothing is needed there; the package is inbookworm-backportsif you want to switch early. -
Initialize your Kerberos token:
where
<NETID>is your Dartmouth NetID (liked11191d).
Use the klist command to see whether there is an active token.
As you will see from the klist output, that token has an expiration date, which is 10 hours from the moment you kinited it.
You can use kinit -R (or just ssh again) to refresh the ticket.
It will be refreshed for up to 30 days.
TODO: make it even more sophisticated (auto-updated).
Now you should be able to just ssh discovery or ssh ndoli.