Setting up a shared VPS on Vultr . SSH Keys.
When setting up a shared VPS on Vultr and configuring SSH Keys for Linux, here's what you need to do:
1. Generate an SSH Key Pair (if you don’t already have one):
On Linux or macOS, open a terminal and run:
ssh-keygen -t rsa -b 4096
Save the key pair to the default location (
~/.ssh/id_rsa
) or specify a custom path.You’ll get two files:
Private Key:
id_rsa
(keep this secure, never share it).Public Key:
id_
rsa.pub
(upload this to Vultr).
2. Add the SSH Key to Vultr:
Go to your Vultr dashboard.
Navigate to SSH Keys under the Products section.
Click Add SSH Key.
Paste the contents of your public key (
id_
rsa.pub
) into the field.Give it a name (e.g.,
my-linux-key
) and save it.
3. Select the SSH Key During VPS Deployment:
When deploying your VPS, under Server Settings, select the SSH key you just added.
This ensures secure, password-less login to your VPS.
4. Access Your VPS Using SSH:
Once the VPS is deployed, connect to it using:
ssh -i /path/to/private_key root@your_vps_ip
Replace
/path/to/private_key
with the path to your private key andyour_vps_ip
with the IP address of your VPS.
Why Use SSH Keys?
Security: SSH keys are more secure than passwords.
Convenience: No need to remember or type passwords.
Automation: Easier to automate tasks like deployments.