Secure remote access is vital to protect your files and data while transferring them to and from your server. SFTP is a secure protocols that provides an additional layer of security over standard FTP. This guide will walk you through the process of setting up SFTP, importing key pairs, and connecting to your server using this protocol.
Now we will see how to generate an SSH key pair from our dashboard but if you already have a key pair available on your computer and would like to use it instead, scroll down to Importing an Existing Public Key.
Generating a Key Pair for SFTP & SSH
Select a Site on the Rapyd Dashboard
Navigate to Tools > File Access
Go to the SFTP & SSH tab
Click the Create key pair button
Provide a name for your key pair
After creating the key pair, you should see the public key listed in the dashboard while the private key downloads automatically
The key pair consists of two files: one is stored on the server (public key), and the other (private key) is stored on your computer. This adds an extra layer of security since only devices with the corresponding private key can authenticate.
If you are looking to upload an existing public key instead of generating a new one, check the following steps on how to import an existing public key. Otherwise, scroll down to Connecting to my Rapyd Server using FileZilla.
Importing an Existing Public Key
Navigate to Tools > File Access in the Rapyd Dashboard
Go to the SFTP & SSH tab
Click on the Import key pair button. Enter a Key Pair Name (this can be the same as the name of the file to be uploaded)
If you prefer to paste the content of the public key, select Paste contents
We recommend uploading the public key file to prevent formatting issues. Select Upload file, choose the public key from your computer (e.g., id_rsa.pub), and click Import Key
After uploading the key, you should see it listed in the dashboard
Connecting to my Rapyd Server using FileZilla
Open FileZilla and go to File > Site Manager
Click New Site and provide a name
In the General tab click Protocol and select SFTP - SSH File Transfer Protocol
From the Rapyd Dashboard, copy the hostname displayed as 'Address' under the SFTP/SSH tab, and paste it into the Host field in FileZilla
Paste the port number (also available in the Rapyd Dashboard) into the 'Port' field.
For Logon Type, select Key file. Then click Browse, open the private key you downloaded earlier (or your existing key) and click Ok
At this point, you can open a connection by clicking the down-arrow icon next Site Manager and selecting the new host:
If you see a password prompt, leave it blank and click Connect.
Note: Remember that your site files are located in "/var/www/webroot/ROOT". If FileZilla shows a different directory, you can paste this path into the Remote site field and press Enter.
Transferring Files
Once you've opened a connection to your Rapyd server and can see your files in the Remote directory tree (on the right-hand side of the screen), you can navigate your local files using the Local directory tree (on the left-hand side). To transfer files, simply select the ones you need from either of the lower views, then drag and drop them into the other view:
Conclusion
By following the steps outlined in this guide, you can set up secure remote access to your server using SFTP. This protocol provides a higher level of security, reducing the risk of unauthorized access and data breaches. As a result, your files and data will be better protected when transferring them to and from your server. Remember that the exact steps might differ depending on your SFTP client software, so consult the relevant documentation for specific guidance.