scp 命令:
part 1: 参看 scp manual
$ man scp
SCP(1) BSD General Commands Manual SCP(1)
NAME
scp — secure copy (remote file copy program)
SYNOPSIS
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
B: jia@jia-server-001 172.16.2.84
在A 上:
$ scp -r test jia@172.16.2.84:/home/jia
pull: 将B上的文件、文件夹传递到A上
$ scp jia@172.16.2.84:/home/jia/test.py /home/jia
$ scp -r jia@172.16.2.84:/home/jia/jia_svn_test /home/jia
part 1: 参看 scp manual
$ man scp
SCP(1) BSD General Commands Manual SCP(1)
NAME
scp — secure copy (remote file copy program)
SYNOPSIS
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
part 2: scp 的基本应用
以如下A、B两台计算机为例:
A: jia@jia-server-svn 172.16.2.142B: jia@jia-server-001 172.16.2.84
在A 上:
push: 将 A上的文件、文件夹传递到 B上
$ scp ue_test jia@172.16.2.84:/home/jia$ scp -r test jia@172.16.2.84:/home/jia
pull: 将B上的文件、文件夹传递到A上
$ scp jia@172.16.2.84:/home/jia/test.py /home/jia
$ scp -r jia@172.16.2.84:/home/jia/jia_svn_test /home/jia