#15:03 16/07/2015
#cat /etc/hosts
10.10.1.141 dc1
10.10.1.142 dc2
10.10.1.141 drbd1
10.10.1.142 drbd2
#drbd1:
ssh-keygen -t rsa
cd /root/.ssh/
#
mv id_rsa.pub id_rsa.pub-dc1
#
scp id_rsa.pub-dc1 root@dc2:/root/.ssh/
#
################
#drbd2:
ssh-keygen -t rsa
#
cd /root/.ssh/
#
mv id_rsa.pub id_rsa.pub-dc2
#
scp id_rsa.pub-dc2 root@dc1:/root/.ssh/
################
#drbd1:
cat id_rsa.pub-dc2 >>authorized_keys
chmod 700 .
chmod 644 authorized_keys
################
#drbd2:
cat id_rsa.pub-dc1 >>authorized_keys
chmod 700 .
chmod 644 authorized_keys
No comments:
Post a Comment