user234194
user234194

Reputation: 1723

problem executing plink(putty) command

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.

Upvotes: 1

Views: 16272

Answers (3)

Gavriel Fishel
Gavriel Fishel

Reputation: 11

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

Upvotes: 1

dogbane
dogbane

Reputation: 274532

Try running it like this:

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

Upvotes: 2

Mark Ransom
Mark Ransom

Reputation: 308111

Judging by some documentation, this should work:

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

Upvotes: 1

Related Questions