
ezilagel
Novice
Oct 31, 2012, 10:01 AM
Post #1 of 13
(1048 views)
|
|
Net::SSH::Perl ( Complex Password Fails? )
|
Can't Post
|
|
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)
|