Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Net::SSH2 Question - again-

by idsfa (Vicar)
on May 28, 2008 at 15:27 UTC ( [id://688878]=note: print w/replies, xml ) Need Help??


in reply to Net::SSH2 Question - again-

You can use ssh's port forwarding to do this:

use strict; use Net::SSH2; my $ssh1 = Net::SSH2->new(); $ssh1->connect($host1) or die "connect to SSH1 failed"; $ssh1->auth_password('user', 'pass') or die "auth1 failed"; $ssh1->tcpip($host2, 22, '127.0.0.1', 9922); my $ssh2 = Net::SSH2->new(); $ssh2->connect('127.0.0.1', 9922) or die "connect to SSH2 failed"; $ssh2->auth_password('user2', 'pass2') or die "auth2 failed"; # ... as many hops as you need ...

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Replies are listed 'Best First'.
Re^2: Net::SSH2 Question - again-
by bgi (Sexton) on May 29, 2008 at 15:47 UTC
    Its not working for me...after a few tests i can say, that it dont understand what to do with this line:

    $ssh2->connect('127.0.0.1', 9922) or die "connect to SSH2 failed";
      this line is not working!! no idea why...i tested the other lines with if(-command-){print "ok";} and every line prints its "ok" expect the given line with tcpip

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://688878]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-23 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found