SSH and multiple commands

Post Reply
atkinsroy
Posts: 3
Joined: Sat Oct 17, 2015 10:01 pm

SSH and multiple commands

Post 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.
natekippen
Posts: 72
Joined: Sun Dec 21, 2014 3:05 pm

Re: SSH and multiple commands

Post 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
apol
Posts: 267
Joined: Wed May 07, 2014 1:51 am

Re: SSH and multiple commands

Post by apol »

If your admin-system is a windows box you can use

Code: Select all

cli.exe -csvtable -nohdtot showvv
When all else fails, read the instructions.
nicDM77
Posts: 17
Joined: Tue Sep 11, 2012 1:58 am
Location: Mechelen, Belgium

Re: SSH and multiple commands

Post 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
atkinsroy
Posts: 3
Joined: Sat Oct 17, 2015 10:01 pm

Re: SSH and multiple commands

Post 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.
Post Reply