How to Connect to a VPS Server for the First Time (Complete Beginner Guide)

First-Time Connection (Initial Setup)

STEP 1: Open VPS Web Console

  1. Log in to your VPS provider dashboard

  2. Open Console / Web Console

  3. You should see something like:

root@your-server-name:~#

This means:
βœ… You are logged in as root

Generate SSH Key on Your PC (One Time Only)

STEP 2: Open Command Prompt / PowerShell (on Windows)

Press:

Windows + R β†’ type cmd β†’ Enter

STEP 3: Generate SSH Key

Run:

ssh-keygen

Then:

You will see:

Your public key has been saved in C:\Users\YourName\.ssh\id_ed25519.pub

βœ… SSH key created successfully

Add Public Key to VPS (One Time Only)

STEP 4: Copy Public Key (on PC)

Run:

type %USERPROFILE%\.ssh\id_ed25519.pub

You will see something like:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... yourname@PC

πŸ‘‰ This is your PUBLIC KEY
πŸ‘‰ Keep it safe, but it is OK to paste on the server.

Add Key to VPS (No Paste Problem Method)

In VPS Console, run:

rm -rf ~/.ssh
mkdir ~/.ssh
chmod 700 ~/.ssh

Now add your public key:

echo 'PASTE_YOUR_PUBLIC_KEY_HERE' > ~/.ssh/authorized_keys

Example:

echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBrcDr4eyZ/B4ftfMWeUbqZ+tf4JIUrXRmV/QrH5KPDT user@PC' > ~/.ssh/authorized_keys

Set permissions:

chmod 600 ~/.ssh/authorized_keys

Verify:

cat ~/.ssh/authorized_keys

βœ… If key shows correctly, setup is complete

Connect to VPS from Your PC (Daily Method)

Connect Using SSH

From Windows CMD / PowerShell:

ssh root@YOUR_SERVER_IP

Example:

ssh [email protected]

βœ… Successful Login Looks Like:

Welcome to Ubuntu 22.04 LTS
root@your-server-name:~#

You are connected!

Do I Need to Repeat These Steps Every Time?

❌ NO β€” Setup is ONE-TIME ONLY

After setup, you only run:

ssh root@YOUR_SERVER_IP

That’s it.

When Do You Need to Repeat Setup?

Only in these cases:

  1. New laptop / PC

  2. Windows reinstalled

  3. VPS OS reinstalled

  4. You deleted .ssh folder

Otherwise ❌ never again.

If you face any issues while setting up SMTP, our support team at Cyberin is ready to help you configure it correctly.