Skip to content

Commit

Permalink
ssh认证
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabc committed Jun 21, 2016
1 parent aa1a44e commit 37b7e21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ansible/ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ vi /etc/ansible/hosts
192.168.142.137
192.168.142.138

#ssh无密码认证 DSA
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

##yum -y install openssh-clients
ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]
ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]
Expand Down

0 comments on commit 37b7e21

Please sign in to comment.