How to transfer SSH keys between different devices

Time:2021-7-5

Some MAC need to transfer SSH keys between different devices, but I don’t know how to transfer SSH keys conveniently. Now Xiaobian will teach you the solution to this problem.

resolvent:

If both devices are in the same LAN, you can use finder to drag the key directly to the target location. However, the. SSH folder is hidden, so you need to find it out first

  defaults write com.apple.Finder AppleShowAllFiles TRUE

Then you can see this folder in the root directory of your account

Or enter “LS – a” to display all hidden files in the root directory of the account

Finally, drag and drop. There is another faster way:

Input:

  cp .ssh/id_rsa* /Network/path/to/username/.ssh/

This is the method of transferring SSH keys between devices in two days. This method is applicable to any MAC system.