执行命令putty ssh

Execute Command putty ssh

我用我的 Windows cmd 连接到另一台机器使用这个命令:

putty.exe -ssh bob@172.16.17.50 -i C:\Users\Administrator\Desktop\bobPrivate.ppk -pw mypass

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

要执行命令,您必须使用 -m 选项。

putty.exe -ssh bob@172.16.17.50 -i C:\Users\Administrator\Desktop\bobPrivate.ppk -pw mypass -m C:\Path\to\file\with\commands

您必须将路径替换为您的路径