用putty 自动登录Linux服务器系统

2012年09月14日 技术资料 2865 views 0

问:公司有几台Linux服务器,我平时都是在Windows XP上用putty进行远程连接管理的。每次都要手动登录,请问有无办法让putty自动登录Linux服务器呢?


答:你需要这两个文件来帮你搞定:putty.exe、puttygen.exe。


运行puttygen.exe,点击generate 生成public key(公钥)和 private key(私钥),保存私钥到d:\ssh\private.ppk中(举例),然后在Linux 上运行如下命令:


ssh-keygen -t rsa (ssh-keygen -d)



复制public key 内容到/home/yourname/.ssh/authorized_keys 中,然后在Windows 上写一个BAT脚本ssh.bat.如下:


start putty -i d:\ssh\private.ppk -l frank x.x.x.x



注意,保存私钥的位置和Linux的IP地址(x.x.x.x)要根据你的实际情况修改。

分享到:
赞🧧赏

发表评论

您需要 登录账户 后才能发表评论

欢迎交流:

欢迎您朋友:

1、本站无广告推广,免费分享

2、内容错误纠错欢迎反馈站长

3、新版解压密码看我QQ空间,或留言

     纯净共享奉献,站长非24小时在线



By iT猫itcat.cn 宣