For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > October 2005 > Net::SSH::Perl









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Net::SSH::Perl
Martin Sommer

2005-10-23, 6:56 pm

Hi,

i have a problem with the Net::SSH::Perl module. i'd like to code a ssh
client in perl, that needs no special functions. it only has to login
and stay there until disconnection. after that it should reconnect and
so on...
i won't enter any commands at the shell after login...it just has to
login and finito.

but:
with the perl ssh module it connects to the given server, but the login
process does not work, i always get a connection timeout.

where is my fault?

---
loginperl.pl

#!/usr/bin/perl
use Net::SSH::Perl;

my $host = 'my.nice.host';
my $user = 'username';
my $passwd = 'password';

my $ssh = Net::SSH::Perl->new($host, protocol => 2, debug => true);
$ssh->login($user,$passwd);


thx,

martin
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com