In this blog, I have added the step-by-step guide to connect to cloudways server using SSH & SFTP.
In my Cloudways review, I have spoken about server access and the level of control you can have on Cloudways servers. Let’s have a look at it practically.
Get Cloudways Server Details
To connect to the server, first, you need to get the server details from the Cloudways server management dashboard.
Click on the server to open the server management dashboard. The first information you will see is the following server details.
- Server IP
- Server username
- server password.
Here is a reference image.
Connect Cloudways Server Using SSH
Following are the three options to connect to cloudways server using the SSH protocol
- SSH using username and password from SSH client
- SSH using ssh keys from SSH client
- SSH using username and password using Cloudways built-in ssh terminal.
Let’s look at each option in detail.
SSH Using username and password From SSH client
First, you need to have an SSH client. If you are using a Windows system, you need to download and install putty SSH client. It is an SSH GUI client for windows.
If you are using MAC or Linux systems, you can use the default system terminal to ssh into the server using the following command. Replace the username and IP address with yours.
The above command will prompt for a password. Enter the password and you will be logged in to the server. Here is an example.
SSH Using Keys
The next option to log in to the Cloudways server is SSH keys.
Step 1: First, you need to generate a public/private SSH key pair. You can follow the generate ssh key blog to create the SSH keys.
Step 2: Click the SSH Public Keys option in the server management dashboard. It will open a popup to add the SSH public key.
Step 3: Add a label to the key and ssh public key to the popup as shown in the image below.
Step 4: Now you can login to the server using the private key as shown below.
~/.ssh/id_rsa with your ssh private key path,
master_fwyurgckrw with your server name and
22.214.171.124 with your server IP address.
ssh -i ~/.ssh/id_rsa [email protected]
SSH using Cloudways built-in ssh terminal.
The third way to connect to the Cloudways server using the in-built Cloudways browser-based terminal.
It is pretty straightforward. Click the launch terminal option from the server dashboard.
It will open up a server terminal connection on your server IP address on port 4200. You can enter the user name and password to log in to the server. This terminal is an open-source shell in a box implementation.
Using SFTP to Transfer Files to Cloudways Server
You can use the following tools to transfer files to the Cloudways server over SFTP protocol
- scp command using Terminal
- Using WinSCP for Windows systems
- Using FileZilla FTP client.
You can check out the transfer files from windows to Linux article where all the SFTP methods are explained properly.
I have added the steps to use SSH and SFTP with Cloudways managed servers in this guide. I would always recommend using SSH keys for logging in to the server.
If you have a DevOps team to manage your Cloudways servers, ensure that the SSH keys are rotated regularly to secure the servers.
Also, if you are in the process of upgrading Cloudways servers, you can make use of Cloudways promo codes to save money.