Click here to get back home

SSH Modules: Accessing CLI box using SSH and not getting the return output??

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
SSH Modules: Accessing CLI box using SSH and not getting the return output?? Deepika 11-12-2006
Posted by Deepika on November 12, 2006, 11:48 pm
Please log in for more thread options


Hi Everyone,

I am trying to write a perl code to access and run few commands on a
Secure CLI-Box using SSH module in Perl.After installing the Perl
module with a lot of difficulty I am facing the following issue. I am
able to log-into the box but I don't get any results back for the
commands I am trying to run on the box.
If I use the same perl code to log-into another linux machine and do
an"ls" I get the result back with no problems at all. Here is the debug
message while trying to access the CLI-box and running the commands.

Any Help will be really appreciated. I have been struck at the same
issue for about a month and my code is due soon and I have no clue how
to fix it.

[root@deepika-linux ~]# cd rnc
[root@deepika-linux rnc]# perl ss.pl
deepika-linux: Reading configuration data /root/.ssh/config
deepika-linux: Reading configuration data /etc/ssh_config
deepika-linux: Allocated local port 1023.
deepika-linux: Connecting to xx.xx.xx.xx, port 22.
deepika-linux: Remote version string: SSH-2.0-OpenSSH_3.5p1

deepika-linux: Remote protocol version 2.0, remote software version
OpenSSH_3.5p1
deepika-linux: Net::SSH::Perl Version 1.30, protocol version 2.0.
deepika-linux: No compat match: OpenSSH_3.5p1.
deepika-linux: Connection established.
deepika-linux: Sent key-exchange init (KEXINIT), wait response.
deepika-linux: Algorithms, c->s: 3des-cbc hmac-sha1 none
deepika-linux: Algorithms, s->c: 3des-cbc hmac-sha1 none
deepika-linux: Entering Diffie-Hellman Group 1 key exchange.
deepika-linux: Sent DH public key, waiting for reply.
deepika-linux: Received host key, type 'ssh-dss'.
deepika-linux: Host 'xx.xx.xx.xx' is known and matches the host key.
deepika-linux: Computing shared secret key.
deepika-linux: Verifying server signature.
deepika-linux: Waiting for NEWKEYS message.
deepika-linux: Enabling incoming encryption/MAC/compression.
deepika-linux: Send NEWKEYS, enable outgoing
encryption/MAC/compression.
deepika-linux: Sending request for user-authentication service.
deepika-linux: Service accepted: ssh-userauth.
deepika-linux: Trying empty user-authentication request.
deepika-linux: Authentication methods that can continue: password.
deepika-linux: Next method to try is password.
deepika-linux: Trying password authentication.

value of stdout = 1

value of stderr =

value of exitt =
deepika-linux: channel 0: new [client-session]
deepika-linux: Requesting channel_open for channel 0.
deepika-linux: Entering interactive session.
deepika-linux: Sending command: ?
deepika-linux: Requesting service exec on channel 0.
deepika-linux: channel 0: open confirm rwindow 0 rmax 32768

value of stdout =
value of stderr =
value of exitt =
[root@deepika-linux rnc]#

Thanks and will wait for the response.


Similar ThreadsPosted
Testing stdout output modules December 28, 2006, 11:26 am
Template-Toolkit: Flushing Output or Incremental Output, how? September 13, 2007, 2:45 pm
system return value? January 26, 2007, 5:52 pm
Net::Cmd::code doesn't return value of Net::Cmd::dataend January 10, 2005, 9:17 pm
Parsing return message from fetchmail June 27, 2006, 3:04 pm
Net::SSH::W32Perl Script hanging when trying to return data March 10, 2005, 1:14 pm
Net::SSH::W32Perl Script hanging when trying to return data March 10, 2005, 1:30 pm
Return keys from $db->DataHash directly into an array September 16, 2007, 11:56 am
Module to return Local Policy Info July 13, 2008, 1:50 pm
perl script for uploading photo and getting the return value of submit February 28, 2006, 1:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap