SCP命令小例子

时间:2023-03-08 20:55:56

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

远端机上文件:

[root@pg200 ~]# pwd
/root
[root@pg200 ~]# ls -l gao.txt
-rw-r--r-- root root Sep : 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::9e::bc:8c::9d:f2::0b::.
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 % .0KB/s :
[root@pg200 ~]# cat jian.txt
A test from gao
Just do it to your best
[root@pg200 ~]#

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