1833874 Members
2668 Online
110063 Solutions
New Discussion

Re: ssh-related question

 
SOLVED
Go to solution
Bill Calver
Advisor

ssh-related question

I'm using ssh (OpenSSH_3.9) successfully via command line and I want to make the same connection programmatically using python and pexpect.

Using ssh -v I see the same output btwn the two methods up until the point where it asks for my passwd. Command line prompts for a passwd but running through pexpect it fails trying to find /opt/ssh/libexec/ssh-askpass which doesn't exist. Afaik ssh-askpass is a linux thing and not hpux.

I don't think this is a pexpect issue since other commands (e.g. pwd, ls) work fine.

Any ideas why it's looking for ssh-askpass? What is the hp equiv?

TIA,
Bill
3 REPLIES 3
Heironimus
Honored Contributor
Solution

Re: ssh-related question

ssh-askpass is not tied to any particular platform (other than X11), but HP may not include it. ssh is probably looking for ssh-askpass because it thinks it doesn't have a terminal but $DISPLAY is set.

I don't know anything about pexpect so I can't really comment on it. pexpect might need to be set to request a tty or something. Unsetting DISPLAY should also prevent ssh from looking for ssh-askpass.

ssh keys are the usual approach for scripted/unattended ssh logins.
Bill Calver
Advisor

Re: ssh-related question

Heironimus,

Thanks, unsetting DISPLAY did the trick.
Bill Calver
Advisor

Re: ssh-related question

See above.