There are different ways to connect to your application remotely, some more secure than others. Two secure methods which we like to use ourselves are Secure Shell (SSH), and Secure File Transfer Protocol (SFTP). Both methods are supported over all our server plans include SSH and SFTP access.

Video Tutorial — How to Connect via SSH on Windows

Video Tutorial — How to Connect via SFTP on Windows

What is SSH?

Secure Shell provides strong authentication and encrypted data communications between two computers or servers connecting over an open network such as the internet. This means that any device in the middle is unable to decipher the communication because only your end device/server is able to decrypt the information exchange.

Tip

You can also run additional tools such as Composer, Git, WP-CLI for WordPress, and database queries using SSH.

What is SFTP?

SFTP stands for Secure File Transfer Protocol (also known as SSH File Transfer Protocol). It is a file transfer protocol such as FTP yet operates over a secure network protocol like SSH. We highly recommend using SFTP for file transferring because:

  • It adds a layer of security.

  • Transferred data is encrypted, so it is not sent in clear text.

How to Connect to Your Application Using SSH/SFTP

Prerequisites

To connect to your server or application using SSH, you will need the following:

We will help you locate this information on your Cloudways Platform in the next steps. Please note that the Master user has SSH access enabled by default; however, you need to manually enable SSH access for the application user(s).

SSH/SFTP — Accessing the Credentials

There are two types of credentials (Master credentials and Application credentials) on the Cloudways Platform that you can use to connect to your application. Usually, team members are provided with application credentials by the website owner. So, which credentials will you be using?

Important

  • If you are using Microsoft Windows you will either need to enable WLS (Windows Linux Subsystem) or else use a free third-party tool such as PuTTY. Alternatively, you can also use the built-in SSH Terminal of Cloudways Platform.

  • You need an SFTP client to connect to your server remotely. In this demonstration, we are using a free third-party tool called FileZilla, which is available on Windows and macOS, but you can also use any other client. Please make sure to download such tools only from their official website to always get the latest available version.

Using Master Credentials

Log in to your Cloudways Platform using your email address and password.

  1. From the top menu bar, open Servers.

  2. Then, choose the server you wish to connect.

3. Under Server Management, you can find your Public IP address, username, and password. Be sure to take note of it.

Tip

Click on credentials to copy it on the clipboard.

Using Application Credentials

Log in to your Cloudways Platform using your email address and password.

  1. From the top menu bar, open Servers.

  2. Then, choose your server where your desired application is deployed to view application credentials.

3. Next, click www.

4. Choose your desired application’s name.

5. Under Application Credentials, you can find your Public IP address, application username, and password. Be sure to take note of it.

Tip

Below, you will find information about initiating connections using SSH and SFTP separately.

SSH (Microsoft Windows) — Initiating Connection

  1. Launch PuTTY client and enter your Host name (Server Public IP address).

  2. Input Port 22, which is also the standard TCP port for SSH.

  3. Click Open.

4. You may see an RSA2 key prompt if this is your first time connecting to the server. Click Yes to make this a trusted host for future connections.

SSH (Microsoft Windows) — Logging in to Server

  1. Here, you need to input your master or application username, which you previously noted.

Tip

  • To paste the copied item in the terminal, tap right-click once.

  • The terminal screen will only work with arrow keys for navigation, not with a mouse.

2. Next, input your password. Please note that no character will appear as you type the password due to security reasons.

3. You are now connected to your server via SSH. Now, you can run commands such as ls to list and navigate your files and directories.

Important

If you are using the Master Credentials, you will need to browse to your target application folder. If you are using the Application Credentials, you will land directly in the respective application folder.

SSH (Linux/macOS) — Logging in to Server

We won’t require any external SSH client for Linux/macOS, although you are free to do so if you already have some preferred 3rd party application. In this example, we are using Linux (Ubuntu).

  1. Open your terminal and execute the following command. Username refers to a master username or application username, and the hostname is your Server Public IP address. By default, the SSH connection is initiated using port 22.

ssh username@host

Example: ssh master_ojnokgldl@192.168.0.1

Note: you can also point your SSH client to which private key should be used by using the -i identity switch as follows:

ssh -i ~/.ssh/id_rsa master_ojnokgldl@192.168.0.1

Tip

  • The terminal screen will only work with arrow keys for navigation, not with a mouse.

2. You may see an RSA key prompt if this is your first time connecting to the server. Type yes to make this a trusted host for future connections.

3. Next, input your password. Please note that your password will not become visible due to security reasons.

4. You are now connected to your server via SSH. Now, you can run commands such as ls to list and navigate your files and directories.

Important

  • If you are using the Master Credentials, you will need to browse to your target application folder. If you are using the Application Credentials, you will land directly in the respective application folder.

  • Please note that SSH is a potent tool, and advanced users use it. Executing wrong instructions may break your website and delete the critical files; therefore, we recommend using it with extra care and always take a backup of the application you are working on or take a whole server backup always to restore if needed.

SFTP — Initiating Connection

  1. Launch FileZilla client and enter sftp://server-ip-address in Host. By writing sftp://, you are ensuring that the SFTP connection is formed.

  2. You need to input your master or application username, which you previously noted.

  3. Next, input your password.

  4. Set Port 22.

  5. Finally, click QuickConnect.

6. You are now connected to your server via SFTP. Now, you can drag and drop files and folders between your personal computer and your server.

Important

  • If you are using the Master Credentials, you will need to browse to your target application folder. If you are using the Application Credentials, you will land directly in the respective application folder.

  • If you face any permission-related issues, then you can also reset your file and folder permissions.

That’s it! We hope this tutorial was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?