sftp download upload file

ssh is really good stuff, not only for controlling computers, tunneling, but also for secure file transfers.

The finder on mac does not seem to support the sftp protocol, so you need to use the command line to transfer files, and the transfer method is also very simple:

1. Connect to the target server: Use sftp user@host to connect to the target server. After successful authentication, the sftp interactive mode will appear

2. Enter the relevant commands to perform sftp interaction. These commands include:

pwd print the current directory of the server
lpwd print the current directory of the machine
cd switch the current directory of the server
lcd switch the current directory of the machine
ls list the files in the current directory of the server
lls list the files in the current directory of the machine
mkdir create a directory for the server
lmkdir for the machine Create a directory
get Get the specified file on the remote server
put Upload the specified file locally to the remote server
help Get help

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325709603&siteId=291194637