2013年11月13日 星期三

ssh autologin to multi server

situation:
         three server with ip 10.10.10.1, 10.10.10.2, 10.10.10,3

1. install all open ssh package on these servers
# apt-get install ssh

2. create the same user account on these servers
# useradd -d /home/user1 -m user1
# passwd user1

3. on one of these three server , generate the public key
# ssh-keygen -t rsa

4. copy public key to the others
#ssh-copy-id -i user1@10.10.10.2
#ssh-copy-id -i user1@10.10.10.3

5. testing the autologin function
#ssh 10.10.10.2

沒有留言:

張貼留言