SUMMARY: Low level (?) error "Error int getting (TCGETA) tty params" executing scripts remotely with SSH and sudo



As usual we quickly got quick and interesting proposals.

Two were axed around assumptions about terminal types and proposed the ssh
switches -n and -t.

I was able to test -n which didn't work just trying (didn't read the man on
ssh)

ssh -n mmsgui@mpm sudo /opt/MPMServer/bin/MPMGuiIhm -c status

I also got some proposals to insert " and \" but I wasn't successful before
the solution (below) came.

Didn't have time to try everything before our programmers modified the source
program MPMGuiIhm.

Apparently there was a call to ioctl.h to get terminal parameters in that
program. When the call was removed it worked.

Unfortunately my summary could be a more complete regarding the switches, but
unfortunately I don't have more elements.

Ragnar

_____________________________________________
From: Ragnar Moller (MA/EAF)
Sent: mardi 31 octobre 2006 17:04
To: sunmanagers@xxxxxxxxxxxxxxx
Subject: Low level (?) error "Error int getting (TCGETA) tty params"
executing scripts remotely with SSH and sudo


We are using ssh to start scripts remotely on a bunch of servers. Commands
cans be things like

ssh mpm ls -ld

Or

ssh mmsgui@mpm sudo /etc/init.d/serverControl.sh status

The examples above work perfectly and result in the desired output.

On the other hand, the following command, which works perfectly on the local
machine, does not work with ssh and produces the following output (first the
command).

ssh mmsgui@mpm sudo /opt/MPMServer/bin/MPMGuiIhm -c status
Error int getting (TCGETA) tty params: Invalid argument
status

MPMServer IHM module: version 3.0
Starting up...
openning logfile...done

MPMihm Exiting...


Cordialement,

Ragnar Moller

Til: + 33 1 69 93 75 73 / ECN 879 5206
Mobile: + 33 6 50 86 47 24
Fax: + 33 1 69 93 70 10
Sicr: + 33 1 69 93 76 01
Email: ragnar.moller@xxxxxxxxxxxx
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages

  • RE: Permit root login for telnet..
    ... Also they have access to most of the prod switches, ... and the server are hooked on 'trusted' switches (and you believe nobody ... There really is no reason to NOT use SSH. ... Kind regards, ...
    (RedHat)
  • Re: Managed switches outside firewalls?
    ... We ran into a problem with switches of a certain vendor when activating SSH. ... The switch locked up every one to two weeks when the management port was open. ...
    (Security-Basics)
  • re: SSH between cisco devices
    ... I have setup several switches with SSH. ... via SSH by using a client, Putty. ...
    (comp.dcom.sys.cisco)
  • Re: SSH - securing the port
    ... > that uses hubs instead of switches (hopefully quite rare these ... Using ssh will prevent that. ...
    (comp.unix.solaris)