Multiple commands using batch and Plink?

Daniel A picture Daniel A · Oct 1, 2015 · Viewed 16.7k times · Source

Hello I am trying to use a batch file to log into a server using plink, go to specific directory and run commands. I can not get this to work. Appreciate any help.

plink -t -ssh [email protected] -pw xxxxx
cd /home/wonderd/public_html/dev.xxxx.com
./shell/indexer.php --reindex catalog_product_price

Answer

Hava L. picture Hava L. · Nov 30, 2016

First I think you have to write the machine name or IP after the plink call The second issue is that plink run always from root directory so you have to send couple commands together separated by ;

like this :

plink.exe <full name of machine / IP> "command one; command 2"