
to upload your website's files, or to place a cpmove file in your hosting root directory for restoration. You can use an FTP client to upload or download files from your web hosting server e.g. You can find all SFTP commands with a short description by executing ‘help’ or ‘?’.Using FileZilla to upload files via SFTP(SSH) or FTPS(SSL/TLS)įileZilla is a popular open-source File Transfer Protocol (FTP) client with versions for Windows, Mac OSX and many desktop distributions of Linux. Create and remove directoriesĬreate a new directory on the remote server sftp> mkdir newdirectoryĬreate a new directory on the local server sftp> lmkdir newdirectory 7.

Or download multiple files with the ‘mget’ command sftp> mget file1 file2 file3ĭownload a directory and all its content with the following command sftp> get -r directory 6. Download files and directories using the get commandĭownload a single file from the remote to the local machine sftp> get file To upload a directory to the remote server, you have to create the destination directory on the remote server first, and then start the upload sftp> mkdir directory To upload multiple files use the following command sftp> mput file1 file2 file3 You can upload single or multiple files or directories from the local machine to the remote one. Upload files and directories using the put command For the remote server use sftp? cd directoryĪnd for the local server use sftp> lcd directory 4. You can easily change the working directory in SFTP. To find the current working directory on the local server use sftp> pwdįor the local server, use the following command sftp> lpwd You can also list the files on the local system sftp> lls 3. The SFTP command to list all files is ls, so that you can list all files and directories in the current working directory, as shown below.ĭirectory directory1 file file.txt file.zip We already mentioned that SFTP is using the same protocol as SSH, so if SSH is not listening on the default port 22, you can specify the port in the command sftp -oPort=2345 ‘2345’ is the port number you are using.

You can also use a hostname instead of the IP address. You can connect to a remote server via SFTP using the following command sftp password: Download files and directories using the get command
