[Linux]密钥登录 2017-01-27 2021-07-26 ssh, 免密码, 登录, 禁止密码 Views: 1000000 Words: 60 Read time: 1 mins. 生成rsa密钥 1ssh-keygen -t rsa 修改/etc/ssh/sshd_config文件 取消注释,允许密钥登录 123RSAAuthentication yesPubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keys 2. 不允许密码登录,只允许密钥登录 1PasswordAuthentication no 重启ssh 1/etc/init.d/sshd restart (•̀ᴗ•́)و ̑̑