SSH Key exchange
April 9, 2021 | StackIf you have never generated a key on your system, or if you want a separate key. Do the following:
ssh-keygen
And following the instructions. Just press enter all way thru, if you do this for the first time. But, you can choose to make another name for the key (other than the default).
Copy your public identity to the server, with ssh-copy-id command:
ssh-copy-id ubuntu@192.168.68.121 (if default)
# if you made a special identity/name, point to the identity
ssh-copy-id -i ~/.ssh/mykey ubuntu@192.168.68.121
enter your password once, to confirm to the server that you have legitimate access. And now login again, to se if every thing worked out as it should (no password confirmation)
ssh ubuntu@192.168.68.121