1.rsync -ar /var/www/html/ [email protected]:/var/www/html/
- scp -r /var/www/html/ [email protected]:/var/www/html/
ssh -keygen 生成密钥
cat /root/.ssh/id_RSA.pub - touch authorized.keys
vi /root/.sh/authorized_keys- yum -y install rsync(客户端)安装rsync服务
- netstat -lnp|grep 873 检查是否已经成功启动
6.scp -r /root/lala/11.txt [email protected]:/root/ 远程被文件传输过去
7.Ssh-keygen 客户端生成密钥
服务端生成密钥
8.[[email protected] ~]# cat /root/.ssh/id_rsa.pub
9.[[email protected] ~]# cat /root/.ssh/id_rsa.pub
10.[[email protected] ~]# vi /root/.ssh/authorized_keys 把客户端和服务端生成的密钥放进去
[[email protected] ~]# vi /root/.ssh/authorized_keys
11.scp -r /root/lala/11.txt [email protected]:/root/
12.crontab -e
编辑该用户的计时器设置;
13.crontab -l 列出该用户的计时器设置
去服务端查看一下,就好了
原文地址:http://blog.51cto.com/13958204/2176937
时间: 2024-10-19 15:20:01