Hi All,

I am using the above package for my project work and stucked at the
following Point.

eb96140: Warning: ignore packet type 100  ----> Program is  hanging here

I have tweaked the source code for the problem I faced and found
following.

File:....../Net/SSH/Perl/SSH2.pm

<snip>
sub client_loop {
    my $ssh = shift;
    my $cmgr = $ssh->channel_mgr;

    my $h = $cmgr->handlers;
    my $select_class = $ssh->select_class;

    CLOOP:
    $ssh->{_cl_quit_pending} = 0;
    while (!$ssh->_quit_pending) {
        while (my $packet = Net::SSH::Perl::Packet->read_poll($ssh)) {
            if (my $code = $h->{ $packet->type }) {
                $code->($cmgr, $packet);
            }
            else {
                $ssh->debug("Warning: ignore packet type " .
$packet->type); ---> Program is hanging here
            }
        }
        last if $ssh->_quit_pending;

        $cmgr->process_output_packets;

        my $rb = $select_class->new;
        my $wb = $select_class->new;
        $rb->add($ssh->sock);
        $cmgr->prepare_channels($rb, $wb);

        #last unless $cmgr->any_open_channels;
        my $oc = grep { defined } @{ $cmgr->{channels} };
        last unless $oc > 1;

        my($rready, $wready) = $select_class->select($rb, $wb);
        $cmgr->process_input_packets($rready, $wready);

        for my $a (@$rready) {
            if ($a == $ssh->{session}{sock}) {
                my $buf;
                my $len = sysread $a, $buf, 8192;
                $ssh->break_client_loop if $len == 0;
                ($buf) = $buf =~ /(.*)/s;  ## Untaint data. Anything
allowed.
                $ssh->incoming_data->append($buf);
            }
        }
    }
}

</snip>

<snip>
> eb96140: Requesting channel_open for channel 0.
> eb96140: channel 0: open confirm rwindow 32768 rmax 16384
> eb96140: Got channel open confirmation, requesting shell.
> eb96140: Requesting service shell on channel 0.
> eb96140: channel 1: new [client-session]
> eb96140: Requesting channel_open for channel 1.
> eb96140: Entering interactive session.
> eb96140: Sending command: cl
> 
> 
>  eb96140: Sending command: cl
> 
> eb96140: Requesting service exec on channel 1.
> eb96140: channel 1: open confirm rwindow 32768 rmax 16384
> eb96140: Warning: ignore packet type 100  ----> Program is hanging 
> here
> 
</snip>
My code is hanging at the line mentioned above while waiting for a
response from the Server. Please let me know what could be the problem.
Is it the server or client code to be checked while encountering the
problem mentioned above. Any pointers to debug this Problem is highly
appreciated.

Thanks & regards,
Rishi



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of

> MUTNURU, RISHI KAUNDINYA (STSD)
> Sent: Friday, October 15, 2004 4:52 PM
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-users] Need information on Net::SSH::Perl package
> 
> Hi All,
> 
> I am using the above package for my project work and stucked at the 
> following Point.
> 
> eb96140: Warning: ignore packet type 100  ----> Program is hanging 
> here
> 
> <snip>
> eb96140: Reading configuration data /.ssh/config
> eb96140: Reading configuration data /etc/ssh_config
> eb96140: Connecting to emlorcamako1.cup.hp.com, port 22.
> eb96140: Socket created, turning on blocking...
> eb96140: Remote protocol version 2.0, remote software version
> mpSSH_0.0.1
> eb96140: Net::SSH::Perl Version 1.23_01, protocol version 2.0.
> eb96140: No compat match: mpSSH_0.0.1.
> eb96140: Connection established.
> eb96140: Sent key-exchange init (KEXINIT), wait response.
> eb96140: Algorithms, c->s: 3des-cbc hmac-sha1 none
> eb96140: Algorithms, s->c: 3des-cbc hmac-sha1 none
> eb96140: Entering Diffie-Hellman Group 1 key exchange.
> eb96140: Sent DH public key, waiting for reply.
> eb96140: Received host key, type 'ssh-rsa'.
> eb96140: Host 'emlorcamako1.cup.hp.com' is known and matches the host 
> key.
> eb96140: Computing shared secret key.
> eb96140: Verifying server signature.
> eb96140: Waiting for NEWKEYS message.
> eb96140: Enabling incoming encryption/MAC/compression.
> eb96140: Send NEWKEYS, enable outgoing encryption/MAC/compression.
> eb96140: Sending request for user-authentication service.
> eb96140: Service accepted: ssh-userauth.
> eb96140: Trying empty user-authentication request.
> eb96140: Authentication methods that can continue: password.
> eb96140: Next method to try is password.
> eb96140: Trying password authentication.
> eb96140: Login completed, opening dummy shell channel.
> eb96140: channel 0: new [client-session]
> eb96140: Requesting channel_open for channel 0.
> eb96140: channel 0: open confirm rwindow 32768 rmax 16384
> eb96140: Got channel open confirmation, requesting shell.
> eb96140: Requesting service shell on channel 0.
> eb96140: channel 1: new [client-session]
> eb96140: Requesting channel_open for channel 1.
> eb96140: Entering interactive session.
> eb96140: Sending command: cl
> 
> 
>  eb96140: Sending command: cl
> 
> eb96140: Requesting service exec on channel 1.
> eb96140: channel 1: open confirm rwindow 32768 rmax 16384
> eb96140: Warning: ignore packet type 100  ----> Program is hanging 
> here
> 
> </snip>
> 
> Can anybody please let me know what is going wrong here. I am unable 
> to execue the required commands due to this problem.
> 
> Thanks & regards,
> Rishi
> 
> _______________________________________________
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to