win下调用putty执行命令脚本分享
程序员文章站
2023-01-08 17:59:04
复制代码 代码如下:@echo offecho ===============================echo production serverecho ====...
复制代码 代码如下:
@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
推荐阅读