SSH File Transfer Protocol is a secure protocol for transferring files between a local and a remote server. On the remote system, an SSH server is needed. The data transfer between the local and remote systems is encrypted using this protocol. We prefer SFTP over FTP because it offers secure data transfer.
While SFTP is preferred, if you only have access to a remote FTP server, use the link below for FTP access.
How to Connect To SSH Server
SFTP establishes a connection to the ssh server. On the remote device, the ssh server must be running. To bind to the example.com server as user Yehiweb, type the following command.
A sftp prompt will appear after successful authentication. Where you can securely download or upload files. On the sftp prompt, type help to get a list of available commands.
How to change the Local and Remote Directories
- ! pwd – This command is used to search the existing directory on a local system.
- pwd – This command is used to determine the existing directory on a remote system.
- lcd – On a local system, the lcd is used to navigate between directories.
- cd – On a remote system, cd is used to navigate between directories.
How To Download Files From SFTP
To download a file from an sftp server to your local system drive, use the get command. To change the location of the local download folder, type lcd. The command below will download remotefile.txt from a remote system to your local system.
Using the -r switch
with the get command to import files and directories in a recursive manner. The command below would recursively download the folder remotedir from the remote system to the local system.
How To Upload Files to SFTP
To upload a file from a local system to a remote system, use the put command. To begin, change the location of the remote upload folder using cd. The command below would move localfile.txt
from a local system to a remote sftp server.
Using the -r switch
with the put command to upload files and directories in a recursive manner. The command below will upload the localdir directory, as well as all files and subdirectories, to a remote server.
Saad Shafqat
Related posts
New Articles
How to Add a White Outline to a PNG in Photoshop
In the digital age, where visuals reign supreme, every pixel counts in making your designs stand out. Whether you’re a…