0

I have a simple pexpect script to ssh into a system:

    p = pexpect.spawn ("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null admin@%s" % (system))
    p.logfile_read = fout
    p.setecho(True)
    time.sleep (5)

    i = p.expect ([VM_PAT_TM_PROMPT_USER, STANDBY_PROMPT, 'password:', pexpect.EOF, pexpect.TIMEOUT, 'Error'], timeout=60)

It works on some of the systems. However, now it started popping up this small window with password prompt. While that window is waiting for the password the p.expect call times out. Is there any way to prevent this extra popup window?

ilya1725
  • 4,496
  • 7
  • 43
  • 68

1 Answers1

0

Found the problem. This is the same issue as described in this question. The popup comes from the SSH settings, SSH_ASKPASS in particular. You can find more details at the SSH man page.

ilya1725
  • 4,496
  • 7
  • 43
  • 68