scp with port number specified

前端 未结 12 793
有刺的猬
有刺的猬 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:40

    This can be achived by specifying port via the -P switch:

    scp -i ~/keys/yourkey -P2222 file ubuntu@host:/directory/
    

提交回复
热议问题