Disclaimer: the author is limited, blog inevitably a lot of flaws and even serious mistakes, I hope you correct. While writing the biggest goal is also to exchange learning, not paying attention and spread. Long way to go, and you encourage each other. https://blog.csdn.net/yexiaohhjk/article/details/90146807
SSH connection to the remote server
Format:
ssh -p [端口号] [用户名]@[ip地址]
For example: The 8001 port, connecting the server 117.121.38.xxx
:
ssh -p 8001 [email protected]
SCP Upload / Download
Using scp transfer files, from a remote server to download or upload a file to the file server, using a local window, / linux / mac command line to complete the operation.
Upload files to a remote server from a local:
Format:
$scp -P [端口号] -r [本地文件路径] [远程服务器用户名]@[远程服务器ip]:[远程服务器的路径]
Note that the front port number P
is capitalized , if the remote server is not the default port number 22 must be filled out.
For example: a local computer D: //hello.txt copied to the remote file server home / hello / directory
scp -P 8001D://hello.txt -r [email protected]:/home/hello/
Download files from a remote server to the local
Only need to top local and remote file server path to change my order, but note that the port number is the first argument.
Format:
$scp -P [端口号] -r [远程服务器用户名]@[远程服务器ip]:[远程服务器的路径] [存放在本地文件路径]
For example: hello to copy files in the home directory of the remote computer to the local computer's D: // next
scp -P 8001 -r [email protected]:/home/hello/ D://