您的位置:首页 > 运维架构 > Shell

SSHSecureShellClinet密钥认证登录

2010-11-02 15:08 381 查看
SSH远程登录安全设定:
1、生成密钥
使用SSH Secure Shell Client --> Edit --> Settings -->
Global Settings--> User Authenication --> Keys-->
Generate New..
选择密钥类型 (DSA)密钥长度 (3072)
命名文件:auth_key
密钥使用密码:*******

使用SSH Secure Shell Client -->Quick Connect-->Authentication[Password]登录
Edit --> Settings -->
Global Settings--> User Authenication--> Keys
选中生成的钥匙--> Upload 上传。

使用SSH Secure Shell Client -->Quick Connect-->Authentication[Password]登录
#cd .ssh
#ssh-keygen –i –f 151auth_key.pub >> authorized_keys (转换成open ssh识别的密钥格式)
#rm –rf 151auth_key.pub
#rm –rf authorization
#chmod 600 authorized_keys
#cd ..
#chmod 700 .ssh

编辑 /etc/ssh/sshd_config
修改:PasswordAuthentication no
#/etc/init.d/sshd restart
使用SSH Secure Shell Client -->Quick Connect-->Authentication[public key]登录

4、去掉密码认证方式,使用public key认证方式

3、转换密钥格式,生成AuthorizedKeysFile: .ssh/authorized_keys

2、上传密钥本文出自 “xxfvert” 博客,请务必保留此出处http://xxfvert.blog.51cto.com/794431/414038
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: