1、跳板机操作:连续三次回车,生成私钥和密钥
ssh-keygen -t rsa
2、ssh-copy-id -i /root/.ssh/id_rsa.pub 192.168.1.100 //依次输入yes,123456(root用户的密码)
ssh-copy-id -i /root/.ssh/id_rsa.pub 192.168.1.100
3、ssh '192.168.1.100' 即可免密登录
ssh '192.168.1.100'
4、设置别名 配置文件中添加 alias jump100='ssh 192.168.1.100'
路径:/root/.bashrc 和 /etc/.profile
写到 /etc/profile 文件中 或者/etc/bashrc两个文件作用一样(系统变量前面需要加export)
vim /root/.bashrc
5、使用别名登录
jump100
标签:免密,CentOS,登录,192.168,bashrc,1.100,ssh,root,id From: https://www.cnblogs.com/yuqilin/p/16775107.html