命令如下:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
ssh-keygen -t rsa
ssh-copy-id -i /root/.ssh/id_rsa.pub root@172.17.xx.xx # 需要免密机器
以上命令是单向的,要互相免密,需要对像机器与本机都执行以上命令。过程中需要回车就回车,需要yes就输入yes,需要输入y就输入y(第三步输入之后需要手动操作一些步骤)
命令如下:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
ssh-keygen -t rsa
ssh-copy-id -i /root/.ssh/id_rsa.pub root@172.17.xx.xx # 需要免密机器
以上命令是单向的,要互相免密,需要对像机器与本机都执行以上命令。过程中需要回车就回车,需要yes就输入yes,需要输入y就输入y(第三步输入之后需要手动操作一些步骤)