如果我想将文件从服务器复制到本地操作系统,请使用:
scp -P 60385 root@162.243.120.200:/myserver/somefile.txt /mylocaladdress/.
但我该怎么做呢?
我试过了:
scp /mylocaladdress/somefile.txt root@162.243.120.200:/myserver/. -P 60835
而且:
scp /mylocaladdress/somefile.txt -P 60835 root@162.243.120.200:/myserver/.
但是我收到了这个错误
ssh: connect to host 162.243.120.200 port 22: Connection refused
lost connection
我在本地Ubuntu
和服务器上的CentOS
6.5
答案 0 :(得分:1)
man scp show:
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
在文件和主机之前将其移植