problem executing plink(putty) command

浪子不回头ぞ 提交于 2019-12-14 02:22:40

问题


I am using Plink to execute remote command:

When using this from cmd prompt in single line it doesnot work:

C:\>c:\plink.exe -l userId -pw psw -m C:\goto\test.bat remote_host

It says unable to open command file "C:\goto\test.bat"

But The following works:

C:\>c:\plink.exe -l userId -pw psw remote_host
C:\>C:\goto\test.bat 

Please help.


回答1:


Try running it like this:

c:\plink.exe -l userId -pw psw remote_host C:\goto\test.bat



回答2:


Judging by some documentation, this should work:

C:\>c:\plink.exe -l userId -pw psw remote_host C:\goto\test.bat



回答3:


This has worked for me:

Call \\LocalServerName\plink.exe -pw PASSWORD -m D:\FOLDER\FILE.exe USER@REMOTESERVER

Or if its a local computer:

Call c:\Folder\plink.exe -pw PASSWORD -m D:\FOLDER\FILE.exe USER@REMOTESERVER

Caps - Change it to your state



来源:https://stackoverflow.com/questions/3721004/problem-executing-plinkputty-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!