How to Transfer Files with SFTP¶
You will be able to directly work with your site files by using SFTP. This guide covers some basic information about SFTP if you are unfamiliar with it and helps you to navigate how to use it for your CodeRed Cloud website.
Let’s start with some of the basics.
What is SFTP? SFTP refers to Secure File Transfer Protocol. You use SFTP to download and upload files to your site via a secure method called Secure Shell (SSH). The protocol encrypts the transfer of files between your computer and the server that hosts your website.
How can you connect via SFTP? To use SFTP, you need an SFTP client, and the hostname, username, and password to your website’s SFTP server.
In this guide:
Download an SFTP Client¶
First you need an FTP client application. There are three that we recommend:
This tutorial will cover FileZilla and command line clients; however, the general process is the same for any other application that you might use.
Obtain Your SFTP Server Info¶
On CodeRed Cloud, your SFTP server info can be obtained by clicking the Deployment tab of a website in the CodeRed Cloud dashboard, as in the image below.
If you do not know your SFTP password, click Reset Password to get a new one.
Connect Using FileZilla¶
At the top of the application you should see a bar that is labeled Quickconnect. This is where you will put your hostname, username, and password. In FileZilla, prefix your hostname with
Next, enter the port. The default port for SFTP is 22.
Click Quickconnect in FileZilla. A warning will pop up. The first time you connect, it won’t recognize the host key. Select that you trust it (OK), and add it to your cache if you want.
If you were successful, you will see something like this:
The right-hand side will show the files for your website, while the left-hand side still shows your local files.
To copy files from your computer to the server, drag them from the left side to the right side. Likewise, to copy files from the server to your computer, drag them from the right side to the left side.
Connect Using the Command Line¶
sftp command line tool is included in most Linux distributions, macOS,
and even Windows 10. Read here to enable SSH client in Windows 10.
Open a command line and connect with the
sftpusing your server info. You will be prompted for your password
After entering the password, you will be dropped into the interactive SFTP shell. Here you can type
helpto get a list of commands.
To recursively copy a local directory (named
local) to the
/wwwdirectory on the server:
sftp> put -r local/ /www/
To recursively copy a server directory (
/log) to a local directory (
sftp> get -r /www/ local/
When finished, type
exit to exit the SFTP client.