scp命令基本用法

scp 用于传输文件到另外一个服务器环境,
命令格式:
scp -p port user@serverip:/home/user/filename /home/user/filename

例子:
[root@localhost ~]# pwd
/root
[root@localhost ~]# ls
anaconda-ks.cfg  ftpaccount   install.log.syslog
backup.tar.gz    install.log  svn1.4.3
[root@localhost ~]# scp backup.tar.gz root@192.168.1.21:/tmp/
The authenticity of host '192.168.1.21 (192.168.1.21)' can't be established.
RSA key fingerprint is 4d:b4:e1:5b:80:8f:ea:df:0a:eb:dd:30:e7:00:07:90.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.21' (RSA) to the list of known hosts.
root@192.168.1.21's password:  << 提示输入192.168.1.21的SSH密码
backup.tar.gz                                 100% 5120KB   1.3MB/s   00:04
[root@localhost ~]#
请使用浏览器的分享功能分享到微信等