scp with port number specified

前端 未结 12 654
有刺的猬
有刺的猬 2021-01-29 17:03

I\'m trying to scp a file from a remote server to my local machine. Only port 80 is accessible.

I tried:

scp -p 80 username@www.myserver.com:/root/file.t         


        
12条回答
  •  北海茫月
    2021-01-29 17:31

    There are many answers, but you should just be able to keep it simple. Make sure you know what port SSH is listening on, and define it. Here is what I just used to replicate your problem.

    scp -P 12222 file.7z user@193.168.X.X:/home/user/Downloads It worked out well.

提交回复
热议问题