使用xshell 免密连接 linux
1. [root@server ~]# ssh-keygen #生成密钥对
2. [root@server ~]# cd /root/.ssh/
3. [root@server ~]# cat id_rsa.pub >> authorized_keys #将公钥文件加入列表
4、如果是xshell,则需要把id_rsa文件导出到windows中
[root@server ~]# sz id_rsa
然后导入到用户密钥管理
连接的时候,选择下面的密钥登录方式即可