0

In the last week I generated a SSH id_rsa key on my localhost that I have copied in authorized_key file at the right place on the remote server I want to reach without entering password.

This worked fine.

Now this morning trying to log again without password, it seems that the key is now invalid, I am asked for a password.

I have retried to generate a new key, and copy it again on the remote server authorized_key and it now re-works !

My question: Why was the initial key no more valid ?

Fabien
  • 166
  • 2
  • 6

1 Answers1

0

I don't know any way to expire a key (you need a certificate), so I think somebody (ISP) could be override the key for maintenance tasks, or you have override your private key in your local machine. I think the best response is to be sure that your local public key and the remote public key are the same.

simont
  • 68,704
  • 18
  • 117
  • 136
TlmaK0
  • 3,578
  • 2
  • 31
  • 51
  • Both key are now different, that why I am looking for the reason why the local machine public key has changed. When you do a ssh is it always the key from your user .ssh/ that is used ? – Fabien Apr 04 '12 at 07:19
  • by default yes, but you can specify different keys by hosts. Here is an example http://www.karan.org/blog/index.php/2009/08/25/multiple-ssh-private-keys – TlmaK0 Apr 04 '12 at 07:27