前言
- windows 7
- putty
- 此种方式不能用于生产,杜绝密码泄露。
Step1 : 在putty 中添加 session
略
Step2 : 编写脚本
@#start "" "C:\Program Files\PuTTY\putty.exe" -load "192.168.1.3" -ssh -l root -pw "root#&2008"
@start "" putty.exe -load -load "192.168.1.3" -ssh -l root -pw "root#&2008"
@exit
- -load “192.168.1.3” : 这里的 192.168.1.3 不是 ip , 是 putty 中添加 session 名。
参考
https://blog.csdn.net/xhhjin/article/details/8447076