执行命令putty ssh



我用Windows cmd用以下命令连接到另一台机器:

putty.exe -ssh bob@172.16.17.50 -i C:UsersAdministratorDesktopbobPrivate.ppk -pw mypass

我必须添加哪个选项才能运行单个命令并在之后断开连接?

要执行命令,必须使用-m选项。
putty.exe -ssh bob@172.16.17.50 -i C:UsersAdministratorDesktopbobPrivate.ppk -pw mypass -m C:Pathtofilewithcommands

您必须用替换路径

最新更新