On Wed, May 26, 2010 at 12:10:43PM +0200, Dejan Muhamedagic wrote:
> Hi,
> 
> On Wed, May 26, 2010 at 03:31:11AM +0200, Matthias Ferdinand wrote:
> > Hi,
> > 
> > ssh exits because it wants to read the password from /dev/tty, but there is
> > no working /dev/tty. The problem was not related to ignored signals.
> > In the first call (haresources config), /dev/tty is available, allowing for
> > a successful connect.
> > 
> > Workaround:    screen -L -D -m <expect_cmd>
> > 
> > Now screen provides the /dev/tty to expect and ssh, ssh can read the
> > password, and I later grab the session output from the file "screenlog.0".
> > 
> > x=`${SCREEN} -L -D -m ${EXPECT} -c "set timeout 120;
> > spawn -noecho ${SSH_COMMAND} ${ipaddr} ${cmd};
> > match_max 100000;
> > expect password: { send -- ${passwd}\r;
> >                    interact timeout 10 return -output \\$spawn_id; }
> > "; cat screenlog.0`
> > 
> > 
> > Not very elegant, but it works.
> 
> OK, but it'd be still better/easier to just use ssh with public
> key authentication. For telnet, there is a python plugin
> ibmrsa-telnet which could be modified for iLO.

DISPLAY=dummy SSH_ASKPASS=/bin/my_cat_passwd_file.sh ssh somewhere
my_cat_passwd_file.sh:
#!/bin/sh
cat /etc/passwd_file

/etc/passwd_file: 0600 root root containing your password ;-)

"Von hinten durch die Brust ins Auge", but works.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to