1830537 Members
2588 Online
110010 Solutions
New Discussion

remsh limitations

 
Mike Duffy_1
Honored Contributor

remsh limitations

Good Afternoon,

I am trying to run a remote command from unix server to a windows 2k3 server. I can run a short lined command but am unable to run a command line that is quite long.
Does anyone know if there is a limitation on the line size for remsh?

10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: remsh limitations

The line limit is probably 256 characters. That is dependent on your Unix envirionment and Terminal settings.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mike Duffy_1
Honored Contributor

Re: remsh limitations

I think I kind of suspected that. I was wondering if it could be changed on the windows remote shell service to allow longer lines?

TwoProc
Honored Contributor

Re: remsh limitations

Check out ssh - its command length may be longer, and it's secure.
We are the people our parents warned us about --Jimmy Buffett
Geoff Wild
Honored Contributor

Re: remsh limitations

Instead of a long command line - put all that in a script - and just call the script.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Mike Duffy_1
Honored Contributor

Re: remsh limitations

Geoff,

This is something we have and are looking at as a solution but would like to do it in a command line so the ux box has more control and will get the response from the remote command.

Geoff Wild
Honored Contributor

Re: remsh limitations

Can you post the command - and what you want to have as a response? There are a lot of good scripter's here that may be able to accomplish what you need.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Mike Duffy_1
Honored Contributor

Re: remsh limitations

Geoff,

We are attempting to pass the following command from a OVO server to a Remedy server to get the server to run a api called runmacro, this will create a ticket from a OVO message. Command is;

remsh sd-els-rem01.tcolumbus.stockex.com -l username ""c:\program files\ar system\runmacro.exe"" -d "c:\program files\
ar system\HOME\ARCmds" -x sd-els-rem01.tcolumbus.stockex.com -e "CreateEvent" -p ServerVar="sd-els-rem01.tcolumbus.sto
ckex.com" -p ServiceGroup="ITO" -p ServiceLine="ITO" -p ServiceArea="ITO" -p Category="ITO" -p Team="Service Provision
" -p Phone="Auto" -p EventManager="USERNAME" -p DetailedDescription="Event raised from ITO by" -p Company="COMPANY NAME" -p EnablementID="N/A" -p Date="1116861863" -p Contact="username" -p NodeList="NODENAME" -p EventDiary="Event ra
ised from ITO by (ITO TS246)" -U "Administrator" -P "PASSWORD"
Geoff Wild
Honored Contributor

Re: remsh limitations

I don't see any variables in your command (IE $USERNAME) etc...

If you create a batch file on the Remedy server called myovo.bat with say:

"c:\program files\ar system\runmacro.exe" -d "c:\program files\ar system\HOME\ARCmds" -x sd-els-rem01.tcolumbus.stockex.com -e "CreateEvent" -p ServerVar="sd-els-rem01.tcolumbus.stockex.com" -p ServiceGroup="ITO" -p ServiceLine="ITO" -p ServiceArea="ITO" -p Category="ITO" -p Team="Service Provision" -p Phone="Auto" -p EventManager="USERNAME" -p DetailedDescription="Event raised from ITO by" -p Company="COMPANY NAME" -p EnablementID="N/A" -p Date="1116861863" -p Contact="username" -p NodeList="NODENAME" -p EventDiary="Event raised from ITO by (ITO TS246)" -U "Administrator" -P "PASSWORD"


Then call it with:

remsh sd-els-rem01.tcolumbus.stockex.com -l username ""c:\program files\ar system\myovo.bat""

Just wondering if that will work or not...

If those on CAPS are indeed variables...then you need to pass them to the batch file...

remsh sd-els-rem01.tcolumbus.stockex.com -l username ""c:\program files\ar system\myovo.bat $USERNAME $NODENAME""

etc...

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Mike Duffy_1
Honored Contributor

Re: remsh limitations

The problem is the DIARY entry section of the command is a unlimited field and so is passed as an arguement.

Jim Keeble
Trusted Contributor

Re: remsh limitations

What if you stored the long command line in a file named "longcomm.bat", then called rcp to copy it to the remote, and then ran "remsh remotesys longcomm" to run it and retrieve the result ?