欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

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