I have 2 machines running on Linux. One has ssh2 configured SOURCE and another has ssh1 configured DESTINATION. How do I generate a key pair in SOURCE whose public key can be understood by DESTINATION? Ideally I need to generate a SSH1 key pair using my installed ssh-keygen in a SOURCE.
2 Answers
Generate v1/v2 SSH keys with ssh-keygen -t rsa1
or ssh-keygen -t rsa
. Then you can copy your key from SOURCE to DESTINATION (and vice-versa) with ssh-copy-id
.
-
Oops editing my answer: ssh-keygen generates v2 keys by default, so you'd only need to say
ssh-keygen -t rsa1
if you want a v1 key, and sayssh-keygen -t rsa
if you want a v2 key.RSD3– RSD32015-08-12 13:14:27 +00:00Commented Aug 12, 2015 at 13:14 -
2You may want to "edit" your previous reply directly :)Mathew Paret– Mathew Paret2015-08-12 13:17:16 +00:00Commented Aug 12, 2015 at 13:17
Use the Command to generate the key
ssh-keygen -t rsa
To Copy use the command give your source and destination
ssh-copy-id
You can change the permission to 700 in .ssh folder
chmod 700 ............
-
This is not what I was looking for. This one generates ssh2 key. Actual answer has been given by @RSD3Mathew Paret– Mathew Paret2015-08-12 14:01:17 +00:00Commented Aug 12, 2015 at 14:01