If you're a website owner or developer, being able to access your application's files and directories is crucial for making updates, configuring settings, and troubleshooting issues. One of the most common ways to do this is by connecting to your application using SSH/SFTP, which provides a secure and efficient way to transfer files and execute commands. In this guide, we will walk you through the steps of connecting to your Cloudways-hosted application using SSH/SFTP, so that you can access and manage your files with ease. Whether you are a beginner or an experienced user, this guide will provide you with the knowledge and tools necessary to streamline your workflow and make the most of your Cloudways hosting.
Understanding SSH and SFTP: Secure Ways to Manage Your Data
When it comes to managing data between computers or servers over the internet, security should be a top priority. This is where Secure Shell (SSH) and Secure File Transfer Protocol (SFTP) come in.
SSH provides a secure way to authenticate and encrypt data communications between two devices, so any communication between them cannot be decrypted by any third party. This is especially important when managing sensitive data or making updates to your website or application.
But SSH is not just limited to file transfers. You can also use it to run additional tools like Composer, Git, WP-CLI for WordPress, and even database queries, making it a versatile and efficient tool for managing your website or application.
Create Amazing Websites
With the best free page builder ElementorStart Now
Similarly, SFTP is a secure file transfer protocol that operates over SSH, adding an extra layer of security to your file transfers. It encrypts transferred data, ensuring that no one can intercept and read it in clear text. As a result, we highly recommend using SFTP for all your file-transferring needs.
Connect to Your Application Using SSH/SFTP
Before you can start connecting to your Cloudways-hosted application using SSH/SFTP, there are a few prerequisites you need to have in place. These include:
- Master or application username: You will need the username associated with your Cloudways account or the specific application you want to access.
- Password: You will also need the password associated with your username.
- Public IP address: This is also known as your server IP, and you can locate it within your Cloudways platform.
In the following steps, we will guide you on how to find this information on your Cloudways platform. Note that while the Master user has SSH access enabled by default, you will need to manually enable SSH access for any application users. With these prerequisites in place, you'll be ready to connect to your application and start making changes with SSH/SFTP.
Accessing Your Application Credentials
To connect to your application on the Cloudways Platform, you will need to access your credentials. There are two types of credentials available: Master credentials and Application credentials. Typically, the website owner will provide team members with Application credentials. If you are unsure which credentials to use, check with the website owner or administrator.
It's important to note that if you are using Microsoft Windows, you may need to enable WLS (Windows Linux Subsystem) or use a third-party tool like PuTTY to connect. However, Cloudways also offers a built-in SSH Terminal option that you can use.
To connect remotely, you will need an SFTP client. In this guide, we will be using the popular and free third-party tool called FileZilla, which is compatible with both Windows and macOS. However, you can use any SFTP client of your choice. Just be sure to download it from the official website to ensure that you have the latest version.
To connect to your Cloudways server using your master credentials, first, navigate to the Cloudways platform and log in using your email address and password. Once you have logged in, you can access the Servers menu from the top menu bar. From here, you can select the specific server that you wish to connect to.
Make sure to take note of the Public IP address, username, and password located in the Server Management section. This information will be important when connecting to your server and accessing your files and directories.
To access the Cloudways server using your application credentials, follow these simple steps:
Log in to your Cloudways Platform account using your email address and password.
Once logged in, navigate to the "Servers" tab located on the top menu bar.
Select the server that hosts the application you want to access credentials for.
Click on the "www" button and choose the name of the application you are interested in.
Look for the "Application Credentials" section, where you can find your application's public IP address, username, and password. Be sure to take note of this information for future reference.
By following these steps, you can quickly and easily access your application credentials on Cloudways and begin managing your website with greater control and flexibility.
Initiating Connection - SSH
To connect to your Cloudways-hosted application using SSH/SFTP, you'll need to follow a few simple steps. First, launch the PuTTY client and enter your Hostname, which is your Server's Public IP address. Then, input Port 22, which is the standard TCP port for SSH, and click Open.
If this is your first time connecting to the server, you may see an RSA2 key prompt. Simply click Yes to make this a trusted host for future connections.
Logging in to Server - SSH (Microsoft Windows)
Input your master or application username, which you previously noted. You can paste the copied item in the terminal by tapping right-click once. Note that the terminal screen will only work with arrow keys for navigation, not with a mouse.
Input your password. Please note that no characters will appear as you type the password due to security reasons.
Press Enter to log in to the server. Once you've successfully logged in, you'll be able to run commands such as "ls" to navigate your files and directories. If you're using the Master Credentials, you'll need to browse to your target application folder, while if you're using the Application Credentials, you'll land directly in the respective application folder.
Logging in to Server - SSH (Linux/macOS)
You don't need an external SSH client for Linux/macOS to connect to your Cloudways server, but you can use one if you prefer. In this guide, we will be using Linux (Ubuntu).
To get started, open your terminal and type in the following command: username refers to either your master or application username, and the hostname is your Server Public IP address. The SSH connection is initiated using port 22 by default.
Note that you can also specify which private key should be used by adding the -i identity switch to your SSH client command.
ssh -i ~/.ssh/id_rsa [email protected]
When connecting to your server via SSH for the first time, you may encounter an RSA key prompt. To establish this server as a trusted host for future connections, type "yes."
After this, you will be prompted to input your password. Keep in mind that for security reasons, your password will not appear on the screen as you type it.
Once you have successfully connected to your server via SSH, you can begin running commands such as "ls" to list and navigate your files and directories.
It's important to note that SSH is a powerful tool that should be used with caution, as executing incorrect instructions can result in breaking your website and deleting important files. As such, we highly recommend using SSH with care and always backing up the application you are working on, or taking a full server backup to ensure you can restore if needed. If you are using Master Credentials, you will need to browse to your target application folder, while Application Credentials will land you directly in the respective application folder.
Initiating Connections - SFTP
To initiate an SFTP connection to your Cloudways-hosted server, you'll first need to launch your FileZilla client and enter "sftp://server-ip-address" in the Host field. This ensures that an SFTP connection is established. You'll then need to enter your master or application username, which you should have noted down earlier, along with your password. Be sure to set Port 22 before clicking on QuickConnect to establish the connection.
Once connected, you can drag and drop files and folders between your local computer and your server. If you're using Master Credentials, you'll need to browse to your target application folder, while if you're using Application Credentials, you'll be directed straight to the respective application folder.
In case you encounter permission-related issues, you can reset your file and folder permissions. By following these steps, you can easily and securely connect to your application using SFTP and streamline your file management tasks.
Connecting to your application using SSH/SFTP is an essential skill for any website owner or developer who needs to manage their files and directories efficiently. By following the steps outlined in this guide, you can easily establish a secure connection to your Cloudways-hosted server and access your files with ease. Cloudways provides a user-friendly platform for managing your hosting needs, and with SSH/SFTP, you can take full advantage of its capabilities to streamline your workflow and boost your productivity. Whether you are just getting started with Cloudways or are an experienced user, incorporating SSH/SFTP into your workflow can help you manage your files more efficiently and take your hosting experience to the next level.