--- title: Windows SSH 自動登入腳本 tags: nycu MIRC104 --- # Windows SSH 自動登入腳本(VBS) > [name=蔡秀吉 ]<br/>[time=Mar 15, 2022][color=#F4B400] ## 做法 - 前提Windows系統中要有OpenSSH 伺服器 用戶端 (openssh client) [安裝 OpenSSH -Microsoft](https://docs.microsoft.com/zh-tw/windows-server/administration/openssh/openssh_install_firstuse) Windows 11:設定->應用程式->選用功能->新增選用功能->OpenSSH 伺服器 ## 做法 - 建立一個notpad(記事本),左上角「檔案」點選「另存新檔」貼上下面程式碼。 - 檔案名稱副檔名改成 XXX.vbs,例如:login.vbs - 存檔類型 選「所有檔案」,放在桌面。 ## 程式 更改成自己的IP(第2行),密碼(第4行)。 ```cmd= set wshshell=Wscript.CreateObject("WScript.Shell") wshShell.Run "ssh nycu@192.168.XX.XXX" Wscript.Sleep 1000 wshshell.SendKeys "nycuXXX" wshShell.SendKeys "{ENTER}" Wscript.Sleep 1000 ``` ## 參考資料 [易普斯龍](https://blog.csdn.net/qq43748322)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up