How Can We Help?
HowTo Create SSH Keys
|
1 |
ssh-keygen -t rsa |
You can press enter here, saving the file to the user home (in this case, my example user is called demo).
|
1 |
Enter file in which to save the key (/home/demo/.ssh/id_rsa): |
Press enter if you want a password-less key or type your password:
|
1 |
Enter passphrase (empty for no passphrase): |
Copy you ssh key to your VPS (non-root user):
It will ask for your password
|
1 |
ssh-copy-id VPSUser@my-vps.cl.indie.systems -p vps_ssh_port |
Copy you ssh key to your VPS (root user):
Login with your non-root user, become root (sudo su) and copy/paste your ssh public key (ex. id_rsa.pub) in /root/.ssh/authorized_keys.
Step 1:
|
1 |
ssh VPSUser@my-vps.cl.indie.systems -p vps_ssh_port |
Step 2:
|
1 |
sudo su |
Step 3 (optional):
if the .ssh directory doesn’t exist, create it
|
1 |
mkdir /root/.ssh |
Step 4:
Paste your public key (ex. id_rsa.pub) in authorized_keys
|
1 |
nano /root/.ssh/authorized_keys |
