Page 1 of 1

SSH and multiple commands

Posted: Sun Jul 08, 2018 12:30 am
by atkinsroy
What I'd really like to use is:

Code: Select all

> showvv -nohdtot -csvtable


but alas, with the onset of setclienv, these parameters are no more. So I'm left with:

Code: Select all

> setclienv nohdtot 1; setclienv csvtable 1 ; showvv


This is ugly, but it works in the CLI. However, I want to run this remotely, and the following does not work:

Code: Select all

> ssh me@my3PAR "setclienv nohdtot 1; setclienv csvtable 1 ; showvv"


So, any idea on how I can get multiple commands to work in an ssh session? I know about plink -m <script>. I'm running this on linux and would rather not install plink as it adds dependencies/reduces portability.

Re: SSH and multiple commands

Posted: Sun Jul 08, 2018 8:32 pm
by natekippen
Commands work with plink... (non interactive sessions)


Plink user@inserv showvv -csvtable -nohdtot

..at least in 3.2.2 there are no issues

Re: SSH and multiple commands

Posted: Mon Jul 09, 2018 12:29 am
by apol
If your admin-system is a windows box you can use

Code: Select all

cli.exe -csvtable -nohdtot showvv

Re: SSH and multiple commands

Posted: Tue Jul 10, 2018 2:18 am
by nicDM77
make a file with commands to parse

Code: Select all

setclienv nohdtot 1
setclienv csvtable 1
showvv


than feed ssh via stdin:

ssh user@3par < file

Re: SSH and multiple commands

Posted: Fri Jul 13, 2018 9:59 pm
by atkinsroy
Thanks for the responses.

1. Using 3.3.1 MU1. Those parameters are not available to me

2. Using a Linux box, so cli.exe is not available

3. Last comment, using stdin works for me. Thanks.