♻️How to SSH into VPS

🤔Terminology

Reference Table
Term
Definition

local

This refers to the system you are currently using to administer all commands. It is typically a Macintosh, Windows 11 PC, mobile phone, or tablet. It is the physical device directly in front of you.

remote

This is the VPS or cloud-based server that you are attempting to connect to in order to perform administrative tasks.

VPS

Virtual Private Server (a server in the cloud). If you are not using a VPS, a bare metal or dedicated server can be used as a substitute for all references to a VPS in these guides.

IP address

The Internet Protocol (IP) address is assigned independently to both your local and remote systems. This address is similar to a mailing address like 123 Main Street, CA 94015, it tells network devices how to locate and communicate with each other.

tcp port

Transmission Control Protocol (TCP) can be thought of like a dedicated channel on your TV or streaming service. In this guide, we’ll focus on port 22, which is the default "channel" used for SSH (Secure Shell) remote access. It’s similar to switching your remote to channel 22 to securely connect to your VPS. On the other end of the connection, your VPS is actively listening on port 22 for incoming requests from your local machine to establish a secure session. ( note this port is configurable; does not need to be port 22 )

Public Key

This is an encryption key that we share with others, which can decrypt any communication between our local and remote systems. It can only decrypt messages that were encrypted using our private key.

Private Key

We use this encryption key that is never shared with anyone. The SSH protocol uses this private key to encrypt data on the local system before transmitting it over the Internet to the remote system, which holds the corresponding public key. Only this public key can decrypt messages that originate from our private key.

🔐Locate the necessary parameters

We will need to identify a few things (parameters) before we connect to our VPS.

See terminology for references.

We should have our notes accessible to identify the parameters below:

🗒️Node Operator Notes
What we need to know
Description

private key name

What private key did we use when we created our VPS originally?

private key location

We need to know the full system path to the private key we created so that we can instruct the SSH protocol utility (which is installed by default on most systems) where to locate and use it.

remote username

When we created our VPS, which non-root user account did we set up?

IP address

What is the IP address of our remote VPS?

Did we configure a unique custom port or use the default SSH assigned TCP Port?

You most likely have not configured a custom TCP port to connect to your VPS; however, using a custom port is recommended as it can provide an additional layer of security for your VPS.


1

Open Terminal Application

Macintosh MacOS Terminal

2

Create our SSH connection string

For our example

Parameter Needed
Example Only Value

Private Key Name

my_private_key

Private Key Location

  • windows

C:/User/MyUser/.ssh
  • Macintosh

/Users/MyUser/.ssh/

VPS username

nodeadmin

Local username

MyUser

Remote IP address

13.13.13.13

SSH Port

22 ( default port )

3

Start SSH Session to Your Validator Node

Build our SSH connection string from the ☝️step (example only - replace with your own values )

  • Windows

ssh-i C:/Users/MyUser/.ssh/my-private_key [email protected]
  • Macintosh

ssh-i /Users/MyUser/.ssh/my-private_key [email protected]
  • Custom port ( example: port 2222 )

ssh-i C:/Users/MyUser/.ssh/my-private_key [email protected] -p 2222
ssh-i /Users/MyUser/.ssh/my-private_key [email protected] -p 2222
4

Private Key Passphrase

You will be prompted to enter your SSH key passphrase.

If this is the first time you connected to your VPS you will be prompted to approve adding the SSH key details into the authorized key list on your VPS. Since we know we purposely attempted this connection, we can say yes yes.

The authenticity of host '13.13.13.13' port <22>: can't be established.
ECDSA key fingerprint is SHA256:<<abcedf1234568910abcdef>>.
Are you sure you want to continue connecting (yes/no)?  

Last updated

Was this helpful?