SSH Password Dialog Box?

Scott Lowrey slowrey at nextone.com
Wed Jan 7 21:52:06 UTC 2004


(By the way, thanks for the tip on using the latest QMTest on both local 
and target systems - it worked.)

The following may seem stupid since QMTest is capable of running tests 
on remote systems, but I have a serious need to work with systems that I 
cannot install QMTest on.  Please humor me for a moment...

I'm seeing an OpenSSH dialog box when running a simple python.ExecTest 
in QMTest and I can't figure out where it's coming from.

I wrote a small Python class that handles ssh connections and is geared 
toward password-free logins.  In other words, if a password is required, 
my implementation raises an exception.  No prompting the user.  I use 
Pexpect to handle the interaction with ssh.

The ssh class works fine.  Unit tests have proven it to be successful in 
a variety of situations, including raising my own ssh.SSHError exception 
if a password prompt is encountered.  To demonstrate, here's a snippet 
from an interactive session that tries to connect to a host that 
requires a password:

 >>> import ssh
 >>> loc = ssh.Location("user","host")
 >>> try:
...     c = ssh.Conn(loc)
... except ssh.SSHError:
...     print "error"
...
error

If I run the exact same script in QMTest as a python.ExecTest, a small 
dialog box pops up asking me the password for "user at host".  Why?  I'm 
raising an exception and catching it in my script!  Is there something 
else going on here?

- oh wait.  Let me guess: there's no pseudo-terminal associated with the 
process, so OpenSSH is talking to KDE or something like that?  I know 
some apps write directly to /dev/tty if they can - is that somehow 
circumventing Pexpect and causing the underlying ssh process to try to 
talk to the window manager?

If that's the case, I can live with it but my ssh class becomes less 
effective when used with QMTest.  Any ideas?  Should I pester the Python 
or SSH people instead?

-- 
*Scott Lowrey*
NexTone Communications
Germantown, Maryland

/(240)912-1369/
www.nextone.com <http://www.nextone.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/qmtest/attachments/20040107/77f9f4e3/attachment.html>


More information about the qmtest mailing list