How to manually transfer files via SFTP on a Linux server? [EASY GUIDE]☑️
Today in this tutorial you will learn how to transfer files securely with SFTP. To open an SFTP connection to a remote system, use the SFTP command followed by the remote server username and the IP address or domain name:
Watch the video tutorial on how to manually transfer files via SFTP on a Linux server.
If you don’t want to watch the video tutorial, skip and proceed with the text version mentioned below.
If you are connecting to a host using password authentication you will be prompted to enter the user password. Once you are logged in to the remote server, your current working directory is the remote user home directory.
Now you need to choose a path where you want to get the file/folder to be transferred. In order to do this run the command “lcd” and specify the destination path.
Now suppose I have to get the file in the directory named “mailer” which is inside public_html so we will run a command as given below:
Once you did that download the files remotely from the source using the get command
To download a directory from the remote system, use the recursive -r option:
get -r /path/to/remote_directory
Now suppose I want to get the “Tester” folder which is located inside public_html of the remote server so we will run a command as given below:
get -r /home/remote_username/public_html/tester
Watch the video carefully so that you don’t miss anything.