生成公钥 私钥
ssh-keygen -t rsa
运行完毕后查看
生成的私钥
/root/.ssh/id_rsa
生成的公钥
/root/.ssh/id_rsa.pub
将公钥传送给其他主机
ssh-copy-id -i /root/.ssh/id_rsa.pub [user@]machine
生成公钥 私钥
ssh-keygen -t rsa
运行完毕后查看
生成的私钥
/root/.ssh/id_rsa
生成的公钥
/root/.ssh/id_rsa.pub
将公钥传送给其他主机
ssh-copy-id -i /root/.ssh/id_rsa.pub [user@]machine