SCP命令小例子

磨砺技术珠矶,践行数据之道,追求卓越价值 
回到上一级页面: PostgreSQL杂记页     回到顶级页面:PostgreSQL索引页 
[作者 高健@博客园  luckyjackgao@gmail.com]

远端机上文件:

[root@pg200 ~]# pwd
/root
[root@pg200 ~]# ls -l gao.txt
-rw-r--r-- 1 root root 40 Sep 30 15:04 gao.txt
[root@pg200 ~]# cat gao.txt
A test from gao
Just do it to your best
[root@pg200 ~]# 

 

在本地机上执行远程拷贝:

[root@pg200 ~]# scp root@10.10.10.2:/root/gao.txt jian.txt 
The authenticity of host '10.10.10.2 (10.10.10.2)' can't be established.
RSA key fingerprint is 8a:e2:d0:df:84:9e:94:bc:8c:29:9d:f2:94:0b:93:46.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '10.10.10.2' (RSA) to the list of known hosts.
root@10.10.10.2's password: 
gao.txt                                                                                                   100%   40     0.0KB/s   00:00    
[root@pg200 ~]# cat jian.txt
A test from gao
Just do it to your best
[root@pg200 ~]# 

 

磨砺技术珠矶,践行数据之道,追求卓越价值 
回到上一级页面: PostgreSQL杂记页     回到顶级页面:PostgreSQL索引页 
[作者 高健@博客园  luckyjackgao@gmail.com]

原文地址:https://www.cnblogs.com/gaojian/p/3347281.html