Submitted by egbert on Fri, 09/14/2018 - 06:41
On the source machine:
Step 1.
ssh-keygen -t rsa -C %user%@%target%
Enter a passphrase if you want, it is not necessary
Step 2.
cat ~/.ssh/id_rsa.pub | ssh %user%@%target% 'cat >> .ssh/authorized_keys'
Authorized Keys file on target machine
.ssh/authorized_keys
is a file on the target machine and should be mode 600.
- Log in to post comments