- use ssh-keygen to generate keys (public/private)
1
|
|
- The keys were generated under ~./ssh folder
- copy public key to vps server
1 2 |
|
- Sign in vps server
- Before we use ssh to connect vps, we have to activate ssh service for ssh connection.
1 2 3 4 5 6 7 |
|
- put your public key to vps
1 2 3 |
|
- On Mac, we can use ‘ssh-copy-id’ to install our identity.pub in a remote machine’s authorized_keys.
- Now, you can ssh to connect your vps directly without typing any password.
- enjoy.