如何在scp命令中指定端口号给服务器传文件?


一直是使用scp给服务器上传文件,但是网管基于安全考虑,把端口号变掉了,比方说是8888,然后我尝试使用了-P,但是服务器不让登录,请问该如何操作?谢谢。

我用的命令是

scp test.tar.bz2 -P 8888 [email protected]:~/

Linux scp scp带端口 传文件

efrit 10 years, 5 months ago

你的命令顺序搞错了!应该是

scp -P 8888 test.tar.bz2 [email protected]:~/

antiyyy answered 10 years, 5 months ago

Your Answer