利用公私钥实现无密码登录

1. 先用 SecureCRT 创建 Openssl 格式的 公私钥
2. 上传公钥到 $HOME/.ssh/authorized_keys
3. 修改 /etc/ssh/sshd_config

PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys #这里是到用户根目录的相对路径

重启 sshd 服务
4. 在 SecureCRT 中设置使用密钥登录

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>