win下调用putty执行命令脚本分享

脚本专栏 发布日期:2025/1/10 浏览次数:1

正在浏览:win下调用putty执行命令脚本分享

复制代码 代码如下:
@echo off
echo ===============================
echo Production server
echo ===============================
echo please input "y" to continue......
set /p input=
if "%input%"=="y" (
"putty.exe" -pw serverPassword -m script.txt username@IP
echo reboot server command executed.
) else echo Does not execute any command
pause