iloveperl has asked for the wisdom of the Perl Monks concerning the following question:
Ok the issue seems to be that the log-in for Netscreen sticks. I'm able to run this same script to a solaris-based box and perform an "ls" for the command and receive output. I've also used the command $ssh->shell after the login and the shell returns. When using debug I notice a few interesting messages which I don't receive when debugging a normal ssh connection. Those messages are as follows:use Net::SSH::Perl print "What username?\n"; $username = <STDIN>; chomp$username; print "What password?\n"; $password = <STDIN>; chomp$password; my $cmd = 'get log event'; my $host = 'x.x.x.x'; my $ssh = Net::SSH::Perl->new($host, cipher => DES3, protocol=>1, deb +ug => true, use_pty=>1); $ssh->login($username, $password); my ($stdout, $stderr, $exit) = $ssh->cmd($cmd); print $stdout
I dont believe this is an RSA authentication error as when I view the log on the Netscreen I see the username/password being authenticated. The other reason I don't believe it's an RSA issue is the fact I can put the $ssh->shell command after the login and the prompt comes up with no problem.#1 RSA authentication failed: Can't load public key. #2 Warning: ignoring packet of type 15.
Netscreen gives 2 messages for successful logins, #1 being: "SCS: SSH user X has been authenticated using password from x.x.x.x. Message #2 is: "Admin user X has logged in via SCS from x.x.x.x. When I'm utilizing the script I check the logfiles on the Netscreen from another session and only see message 1. The command also never gets issued as there is a log entry for the command. Perl also just sits. If I add the $ssh->shell or utilize a normal ssh login I get both messages. I'm wondering what could be wrong with my script where the login isn't going all the way through or if Netscreen has some crazy ssh that doesn't work.
Also, SSH-2 doesn't work on Netscreen as it states major protocol versions differ 2 v 1. Any help/ideas much appreciated.
janitored by ybiC: Balanced <code> tags around codeblock & error message, as per Monastery convention.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net SSH Module problem with Netscreen (you might have to use Expect)
by grinder (Bishop) on Jun 16, 2004 at 07:30 UTC | |
by iloveperl (Initiate) on Jun 16, 2004 at 18:14 UTC |