Howto import existing ssh keys?

Hi group,
On my openSUSE 10.2 system I had generated some ssh keys.
I saved these, private and public saved seperately.
I’ve switched to openUSES 11.0
I’d like to import these saved keys ‘the correct way’.

From memory ssh-keygen creates the keys saves them in all the right places with correct permissions etc. I’d like to have all that done but with the existing key values.

Appreciate any suggestions.

Just put them in ~/.ssh. The default key is id_dsa/ or id_rsa/ Assuming you don’t want the new ones, just overwrite them.

If you mean the system host keys, they are in /etc/ssh. Again, just overwrite the new ones, but be prepared for warnings when you connect from other machines that the key has changed.

Hi Ken,
Thanks for looking at this.
I copy the files to ~/.ssh/id_dsa and ~/.ssh/
When I try to use them I see:

Permissions 0644 for ‘/home/mv/.ssh/id_dsa’ are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/mv/.ssh/id_dsa
Permission denied (publickey).

Any suggestions?


solved with:

chmod 0600 ~/
chmod 0600 ~/id_dsa