Update cluster keys
BE AWARE THAT IF YOU REMOVE YOUR OLD KEY BEFORE UPDATING THE REMOTE SYSTEM, YOU WILL NEVER MORE GET ACCESS TO THE CLUSTERS
- Create a backup copy of your old private and public keys
- Create the new keys with a name different from the existing one
- Access all the clusters on which you need to update the public-key and add the content of the new public-key in ~/.ssh/authorized_keys, then remove your old public key line
- Back on your local machine, copy the new public and private keys with the correct name and location.
Here you can find an example:
Create a backup of the old keys
cp id_dsa id_dsa.OLD
cp id_dsa.pub id_dsa.pub.OLD
Create the new keys as usual, but specifying a different name
ssh-keygen -t dsa -f ~/.ssh/NEWKEY
Copy the new public key on the cluster...
cat ~/.ssh/NEWKEY.pub | ssh cluster "cat >> ~/.ssh/authorized_keys"
Substitute the keys
mv NEWKEY id_dsa
mv NEWKEY.pub id_dsa.pub
Logon on the cluster and remove the old public key from ~/.ssh/authorized_keys
Have a nice computation...