HPE Storage Users Group

SSH and multiple commands
Page 1 of 1

Author:  atkinsroy [ Sun Jul 08, 2018 12:30 am ]
Post subject:  SSH and multiple commands

What I'd really like to use is:
> showvv -nohdtot -csvtable

but alas, with the onset of setclienv, these parameters are no more. So I'm left with:
> 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:
> 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.

Author:  natekippen [ Sun Jul 08, 2018 8:32 pm ]
Post subject:  Re: SSH and multiple commands

Commands work with plink... (non interactive sessions)

Plink user@inserv showvv -csvtable -nohdtot

..at least in 3.2.2 there are no issues

Author:  apol [ Mon Jul 09, 2018 12:29 am ]
Post subject:  Re: SSH and multiple commands

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

cli.exe -csvtable -nohdtot showvv

Author:  nicDM77 [ Tue Jul 10, 2018 2:18 am ]
Post subject:  Re: SSH and multiple commands

make a file with commands to parse
setclienv nohdtot 1
setclienv csvtable 1

than feed ssh via stdin:

ssh user@3par < file

Author:  atkinsroy [ Fri Jul 13, 2018 9:59 pm ]
Post subject:  Re: SSH and multiple commands

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.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group