running multiple ssh commands in a batch file
Posted: 19 Apr 2018 21:05
Hi,
This works as a batch file.
It executes the 2 commands and shows me the results. But what if I have to run 100 commands. I'll have to arrange them vertically. So I tried various things but I can't figure it out.
The following don't work, and I tried many other variations that I don't list here. Help?
This works as a batch file.
Code: Select all
plink.exe -ssh user@<ip address> -P 22 -pw password ( pwd ; ls ;)
The following don't work, and I tried many other variations that I don't list here. Help?
Code: Select all
plink.exe -ssh user@<ip address> -P 22 -pw password (
pwd ;
ls ;
)
plink.exe -ssh user@<ip address> -P 22 -pw password {
pwd ;
ls ;
}
plink.exe -ssh user@<ip address> -P 22 -pw password [
pwd \
ls \
]