Amsterdamned has asked for the wisdom of the Perl Monks concerning the following question:
I have a program which uses Expect.pm to telnet to a host and I have to convert it to use ssh instead. My problem is that ssh seems to use the screen and keyboard when prompting for and accepting passwords, so Expect's use of stdin and stdout doesn't work. SSH sends back a "Permission denied, please try again." message three times before giving up, but Expect never sees the password prompt.
I have to log in with a username and password and I can't use an empty passphrase instead
I also tried Net::SSH::Perl which managed to log on OK, but because the remote host is running ssh v1 I can't run multiple commands on one connect (another requirement)
Has anyone else been able to do this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Expect.pm and username/password to ssh to a host
by Juerd (Abbot) on May 10, 2004 at 14:07 UTC | |
by Amsterdamned (Novice) on May 10, 2004 at 14:26 UTC | |
|
Re: Using Expect.pm and username/password to ssh to a host
by idsfa (Vicar) on May 10, 2004 at 15:13 UTC | |
by BUU (Prior) on May 10, 2004 at 23:16 UTC | |
|
Re: Using Expect.pm and username/password to ssh to a host
by TilRMan (Friar) on May 11, 2004 at 06:18 UTC |