Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I reboot my machine (as I did today) I seem to lose some functionality, specifically my previous ssh keys that I had copied over to other machines that had allowed me to login without a password seem to have stopped functioning.

I've tried replacing the key by generating a new key, destroying the old keys on both my current machine and in the ~/.ssh/authorized_keys on the remote but no luck. I also tried to copy the key back over using the command below but it still doesn't seem to function.

ssh-copy-id <myusername>@<remoteserver>

Any ideas would be helpful.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

If you have encrypted your private key (by supplying a passphrase when you created it), then you have to decrypt it before you can log into remote systems. It is possible you were using an ssh agent on the local system to store the unencrypted key. When you rebooted, the key would have been flushed from the agent's memory. If that is the case, you will need to re-add the key to the agent (using something like ssh-add), and then you should be able to login without supplying a password or passphrase, assuming the public key is in place, permissions and ownership correct, etc.

Whether or not ssh-agent is running depends on your environment. I belive most desktop environments these days run the desktop session under ssh-agent, so ssh-add will "just work."

share|improve this answer
    
That worked thanks. –  Mark D Sep 10 '12 at 21:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.