To open the Mac Termial terminal, perform the following steps


1. Use SSH

  1. To connect to remote Linux, enter your password
SSH Username @IP address Example: SSH [email protected]Copy the code
  1. The following commands require ports
SSH -p Port username @IP address Example: SSH -p 22 [email protected]Copy the code

2. Use SFTP

  1. To connect to remote Linux, enter your password
SFTP Username @IP address Example: SFTP [email protected]Copy the code
  1. Upload a file
Remote working directory: /home/root/ Remote/SFTP /Users/ren/local/ sftp>Copy the code
Put the -r path of local remote example: put - r/Users/ren/local/test. The zip/home/root/remote /Copy the code
  1. Upload a folder (create a folder remotely)
Put the -r local path/folder / * remote path/new folder/example: put - r/Users/ren/local/testFolder / * / home/ren/remote/newFolder /Copy the code
  1. The download file
Get - r local path to remote example: get - r/home/ren/remote/test. Zip/Users/ren/local /Copy the code
  1. Download folder (create folder locally)
Get -r remote path/folder / * local path/new folder/example: get - r/home/ren/remote/myFolder / * / Users/ren/local/newFolder /Copy the code

3. Quit

exit 
Copy the code

4. Use the SCP

  1. Remote copy to local
SCP -r username @ IP address: the path of the remote local example: SCP - r [email protected]: / home/ren/remote test. Zip/Users/ren/local/example: SCP - r [email protected]: / home/ren/remote/myFolder / / Users/ren/local /Copy the code
  1. Local copy to remote copy
SCP - r local path username @ IP address: remote path example: SCP - r/Users/ren/local/test. The zip [email protected]: / home/ren/remote/sample: SCP - r/Users/ren/local/myFolder/[email protected]: / home/ren/remoteCopy the code