# ssh带密码登录(vb脚本)

1 min read
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
'WshShell.Run "cmd.exe" '打开cmd.exe,我习惯在已打开的终端里运行,这里就注释掉了
WScript.Sleep 2000 '等待2秒
WshShell.SendKeys "ssh -p 8270 [email protected]" 'ssh命令
WshShell.SendKeys "{ENTER}" '回车
WScript.Sleep 5000 '等待5秒
WshShell.SendKeys "haxEU-4J155024" '输入密码
WshShell.SendKeys "{ENTER}" '回车

Comments