linux 免密码登录

a 机器免密码登录 b 机器

a机器上执行:
ssh-keygen -t rsa -P ‘’

scp id_rsa.pub 192.168.100.10:/root/
vim /etc/hosts

192.168.100.10 s1

b机器上执行:

cat id_rsa4.pub > /root/.ssh/authorized_keys

a 机器登录:ssh s1