使用windows的ssh的public key来连接 linux
1.在SSH Secure Shell Client生成keysettings->User Authentication->keys->Generate New...->下一步->RSA->下一步->File:authorized_keys->下一步完成
2.把C:\DocumentsandSettings\Administrator\ApplicationData\SSH\UserKeys下的authorized_keys.pub上传到服务器的/root目录上去
[root@mysqlserver~]#mkdir.ssh
[root@mysqlserver~]#cd.ssh
[[email protected]]#ssh-keygen-i-f../authorized_keys.pub>>authorized_keys
[[email protected]]#cd/etc/ssh/
[root@mysqlserverssh]#cpsshd_configsshd_config.back
[root@mysqlserverssh]#visshd_config
PubkeyAuthenticationyes/*启用PublicKey认证
AuthorizedKeysFile .ssh/authorized_keys /*PublicKey文件路径PasswordAuthentication no /*禁止密码验证登录
[root@mysqlserverssh]#/etc/rc.d/init.d/sshdrestart
Stoppingsshd:[OK]
Starting sshd: [ OK ]3.在windows上使用SSH Secure Shell Client登录linux主机选择public key方式就可以登录了