scp with port number specified

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

    scp help tells us that port is specified by uppercase P.

    ~$ scp
    usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
               [-l limit] [-o ssh_option] [-P port] [-S program]
               [[user@]host1:]file1 ... [[user@]host2:]file2
    

    Hope this helps.

提交回复
热议问题