 |
Home:
Perl Programming Help:
Beginner:
Net::SSH::Perl ( Complex Password Fails? ):
Edit Log
|
|

ezilagel
Novice
Oct 31, 2012, 10:01 AM
Views: 5258
|
Net::SSH::Perl ( Complex Password Fails? )
|
|
|
I'm attempting to write a script that logins via ssh and provides an output of a command. However, it seems that when I try to login using a complex password, it fails to authenticate. Here is an example... The below will fail to authenticate. If I change the password on the remote user to simple word or a word with numbers it works fine. Any idea?
#!/usr/bin/perl use Net::SSH::Perl; my $host = 'x.x.x.x'; my $user = 'user'; my $password = 'P@ssw@rd!'; #-- set up a new connection my $ssh = Net::SSH::Perl->new($host); #-- authenticate $ssh->login($user, $password); #-- execute the command my($stdout, $stderr, $exit) = $ssh->cmd("uname -a"); print "$stdout\n"; Thanks. Edit: Output of running the script when failing.. Permission denied at script.pl line 12
(This post was edited by ezilagel on Oct 31, 2012, 12:09 PM)
|
|
Edit Log:
|
Post edited by ezilagel
(Novice) on Oct 31, 2012, 10:02 AM
|
Post edited by ezilagel
(Novice) on Oct 31, 2012, 11:41 AM
|
Post edited by ezilagel
(Novice) on Oct 31, 2012, 12:09 PM
|
|
|  |