Running commands on remote box using Plink
Posted: 24 May 2010 11:17
Hi,
I am using Plink to access remote server. I want to run few commands on the remote server. Though I am able to connect to the remote machine, I am not able to run any command.
The following works:
--------------------------------------------------------
plink -ssh -l %user_name% -pw %user_pwd% %machine%
--------------------------------------------------------
The following doesn't:
-----------------------------------------------------------------------
plink -ssh -l %user_name% -pw %user_pwd% %machine% "cd e:\data"
-----------------------------------------------------------------------
Can anyone please tell me how to do 'cd' on a remote box using plink? Obviously, I want to run few other commands as well after doing 'cd' operation.
Regards,
GC
I am using Plink to access remote server. I want to run few commands on the remote server. Though I am able to connect to the remote machine, I am not able to run any command.
The following works:
--------------------------------------------------------
plink -ssh -l %user_name% -pw %user_pwd% %machine%
--------------------------------------------------------
The following doesn't:
-----------------------------------------------------------------------
plink -ssh -l %user_name% -pw %user_pwd% %machine% "cd e:\data"
-----------------------------------------------------------------------
Can anyone please tell me how to do 'cd' on a remote box using plink? Obviously, I want to run few other commands as well after doing 'cd' operation.
Regards,
GC