ssh key stops functioning after a while
First, an ssh key does not "expire" (ssl certificates do, but that is another topic). They are revoked (removed from the .authorized_keys on the remote side)
(Update August 2019: as shown in "SSH certificate authentication for GitHub Enterprise Cloud", SSH allows one SSH key (a certificate authority) to sign another SSH key, along with information about the developer it belongs to. And that include an expiration date)
Second, if it was working and no longer work, something must have changed, like the $HOME
value (since ssh looks for a public/private key in $HOME/.ssh
)
If is possible that the process using ssh does not run with the usual account, but with another user (or with root if preceded by sudo
)
Qiaosen Huang
Updated on June 04, 2022Comments
-
Qiaosen Huang almost 2 years
I was using git on a remote server (Ubuntu 14.04 LTS). It works smoothly, until a certain amount of time passed by. I was denied access to the repository (no this issue on my local machine). How does this happen? And is there anyway to solve it?
-
Qiaosen Huang over 8 yearsIt "expires" a while after re-log in
-
VonC over 8 yearsThen it sounds like a ssh-agent issue