win下调用putty执行命令脚本分享
程序员文章站
2023-11-25 12:18:40
复制代码 代码如下:@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
上一篇: Shell脚本判断IP地址是否合法的方法
下一篇: 通过shell进行数学运算的多种方式