Assuming you want A to access B
1. Using ssh-keygen to generate public and private keys
NAME
ssh-keygen — authentication key generation, management and conversion.
Don't put pass-phrase, just type an enter when it asks you "Enter pass-phrase" otherwise it will still prompt you to key in pass-phrase when it connects.
2. Using ssh-copy-id to install your public key to remote server
NAME
ssh-copy-id - install your public key in a remote machine's authorized_keys.
Type
~$ ssh-copy-id -i ~/.ssh/id_rsa.pub <username>@<host_ip>
Then test ssh, sftp and scp.
No comments:
Post a Comment