scp with port number specified

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

    Copying file to host: scp SourceFile remoteuser@remotehost:/directory/TargetFile

    Copying file from host: scp user@host:/directory/SourceFile TargetFile

    Copying directory recursively from host: scp -r user@host:/directory/SourceFolder TargetFolder

    NOTE: If the host is using a port other than port 22, you can specify it with the -P option: scp -P 2222 user@host:/directory/SourceFile TargetFile

提交回复
热议问题