标签:ssh
server端分发其它多台client端
######################################
server端 192.168.200.77 client端192.168.200.88
yum -y install openssh-clients
useradd oldboy
su oldboy
ssh-keygen命令建议一对秘钥对在~/.ssh
ssh-copy-id -i ~/.ssh/id_rsa.pub oldgirl@192.168.200.88
在 client端/home/oldgirl/.ssh/authorized_keys
scp -r /etc/hosts oldgirl@192.168.200.88:~
ssh -t oldgirl@192.168.200.88 sudo rsync /home/oldgirl/hosts /etc/
client端设置
yum -y install openssh-clients
useradd oldgirl
visudo
oldgirl ALL=(ALL) NOPASSWD:/usr/bin/rsync
标签:ssh
原文地址:http://hdl993101.blog.51cto.com/1242673/1975684