in reply to Re: String format question
in thread String format question
This code produces the error, "input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8/cygwin/Crypt/DES.pm line 57"use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new("myhost", debug => 1, protocol => 2); $ssh->login("myUser", "myPassword"); my ($out, $error) = $ssh->cmd("pwd"); print $out . "\n";
use Tk; use Net::SSH::Perl; my $username; my $password; my $mw = MainWindow->new(); my $entry1 = $mw->Entry(-textvariable => \$username)->pack(); my $entry2 = $mw->Entry(-textvariable => \$password)->pack(); my $button = $mw->Button( -command => sub { my $ssh = Net::SSH::Perl->new("myhost", debug => 1, protocol => +2); $ssh->login($username, $password); my ($out, $error) = $ssh->cmd("pwd"); print $out . "\n"; } )->pack(); MainLoop;
|
|---|