by predakanga · 5y ago · 0 comments
OpenSSH supports this through the AuthorizedKeysFile directive - it'd be quite simple for the homedir mounting tool to sync that file from the user's authorized_keys file on unmount.
You could also use SSH certificates, but that requires a CA - not ideal for the home user.
AuthorizedKeysFile /etc/ssh/authorized_keys/%u
(For example, /etc/ssh/authorized_keys/bob)