How to use SSH to connect to an Instance
How to use SSH to connect to an Instance
User Guides
- Connect to an Instance using SSH Remote Desktop with X2Go
- Encrypted File System on Volumes
Secure Shell or SSH is a protocol that allows you to connect to Instances (Linux machines). Using SSH, you can access/interact with your Instance securely since the connection is highly encrypted.
Prerequisites
A running Instance IP address.
Username of the server.
Password for the username if you are not using SSH keys.
Firewall settings should allow the remote connection.
An SSH key is a combination of the private key and public key. The Private key is only known to you and is located on the client machine. In contrast, the Public key can be shared with anyone or used on any server you want to access.
There are two ways to connect to an Instance.
Connect with OpenSSH
OpenSSH is included on Linux, macOS, and Windows Subsystem for Linux. You need to use a terminal on a Linux, macOS, or Windows computer to connect to your Instances with SSH.
To connect to the Remote Desktop via SSH, follow the steps below:
Open the terminal and use the following command and enter the IP address of an Instance.
ssh [email protected]
Note: For most of the operating systems (Ubuntu and CentOS), the username is root.When you login the first time, the server isn't identified on your local machine, so you will be prompted with the following message:
The authenticity of host '203.0.113.0 (203.0.113.0)' can't be established.
ECDSA key fingerprint is
SHA256:IcLk6dLi+0yTOB6d7x1GMgExamplewZ2BuMn5/I5Jvo.Type yes and then press ENTER to continue.
Are you sure you want to continue connecting (yes/no)? yes
As a host key is saved to your local machine, you will receive the following confirmation:
Warning: Permanently added '203.0.113.0' (ECDSA) to the list of known hosts
In the authentication process, you will be connected to your Instance instantly if you already have added SSH keys.
In case you didn't add your SSH keys, you will be asked for your password with the following command:
[email protected]'s password:
Enter the Password press ENTER.
Note: We are trying to ssh to a remote Instance having an IP address as 203.0.113.0 and username as root.
Connect with PuTTY
PuTTY is a widely used open-source software SSH and Telnet client for Windows that lets you connect to your remote computers/instances from your local machine (Windows computer). You need to have PuTTY installed on your local machine.
If you don't have PuTTY installed, refer to its official website to download it.
To connect to the Instance via PuTTY, follow the steps below:
Launch the PuTTY and enter the IP address of an Instance.
Check its port (it should be 22 by default) and Connection type should be SSH.
Click Open
Click SSH under Connection in the left sidebar and check 2 is selected for SSH protocol version.
A message will prompt you to enter your username, enter username root, and press Enter.
Enter your Password press ENTER.
You are now successfully connected to your Instance with the PuTTY client.
Connect to Instance using SSH keys via PuTTY
This guide considers that you have uploaded the public key to your account and specified the key while creating an Instance.
To connect to Instance using SSH keys, follow the steps below:
Double-click SSH under Connection in the left sidebar and open Auth.
In the RHS Private key file for authentication section, click Browse.
Search for a private key file that ends with .ppk and click open.
Click Data under Connection in the left sidebar and enter your Instance's username in Auto-login username root.
Click Session in the left sidebar and enter the name in the text box under Saved Sessions.
Click Save.
As your changes are saved, you will be connected to your Instance.