当前位置: 操作系统/服务器>linux
win下调用putty执行命令脚本分享
来源: 互联网 发布时间:2014-10-15
本文导语: 代码如下:@echo offecho ===============================echo Production serverecho ===============================echo please input "y" to continue......set /p input=if "%input%"=="y" ("putty.exe" -pw serverPassword -m script.txt username@IPecho reboot server command executed.) else echo Does n...
代码如下:
@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