How to change pass-phrase for SSH key authentication
Published: 24-Jan-2011 (23:35); Viewed: 2116; Difficulty: 2 out of 10
RSA key based authentication is one of the most secure and convenient way for authorization between Unix computers. One of the classical mistakes, very common for beginners is very long and strong pass-phrase, which can be easily forgotten. Here we will give you simple instruction, how to generate new pass-phrase and change keys for authentication. Unfortunately, it is impossible to restore an old pass-phrase.
Remove locally stored file with authentication keys. Usually, buy default, you should remove /home/yourname/.ssh/id_rsa file.
Login to remote Unix computer and edit file with public keys (~/.ssh/authorized_keys).
In the file with public keys (~/.ssh/authorized_keys) find the line corresponding to your local computer and remove it. This line should looks like
ssh-rsa VeRy_lONg_RandOm_seT_oF_SymBOls== <username>@<local_host_name>
and delete this line.
Now you can repeat step-by-step your SSH key authentication process again, and do all your best to do not loose secret pass-phrase again.