使用windows的ssh的public key来连接 linux
1.在SSH Secure Shell Client生成keysettings->User Authentication->keys->Generate New...->下一步->RSA->下一步->File:authorized_keys->下一步完成
2.把C:\Documents and Settings\Administrator\Application Data\SSH\UserKeys下的authorized_keys.pub上传到服务器的/root目录上去
# mkdir .ssh
# cd .ssh
# ssh-keygen -i -f ../authorized_keys.pub >> authorized_keys
# cd /etc/ssh/
# cp sshd_config sshd_config.back
# vi sshd_config
PubkeyAuthentication yes /*启用PublicKey认证
AuthorizedKeysFile .ssh/authorized_keys /*PublicKey文件路径
PasswordAuthentication no /*禁止密码验证登录
# /etc/rc.d/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
3.在windows上使用SSH Secure Shell Client登录linux主机选择public key方式就可以登录了
页:
[1]