本地和服务器文件互传

本地上传到服务器

scp [localPath] [username]@[IP]:[serverPath] 
例:scp ./download/go1.14.2.linux-amd64.tar.gz [email protected]:download

服务器文件下载本地

scp [username]@[IP]:[serverPath] [localPath]

指定服务器端口

scp默认连接服务器的22端口,如果想指定端口可以用 -P

scp -P 20021 [username]@[IP]:[serverPath] [localPath]

猜你喜欢

转载自blog.csdn.net/wwqcherry/article/details/106082705