Rajeev
Rajeev

Reputation: 46899

ssh error in perl code

Hi Can someone tell me what is this error i get from the ssh command when i use it in the perl code.I have permissions on remote machine and local machine

Code

$site = "/tmp/write.lock";
 my $ssh = Net::SSH::Perl->new($hostname, protocol => '1,2', debug => 1, interactive => 1);
  $ssh_release->login($username, $password);
  ($stdout,$stderr,$exit) = $ssh_release->cmd("$site");
  if(defined $stdout)
  {
      //Do something
  }

Output

Localhost>  ./sh.pl
The authenticity of host 'iind-login.iind.intel.com' can't be established.
Key fingerprint is 3e:88:aa:70:cb:e5:4a:d7:a4:f5:8b:8b:d5:b3:2c:6e.
Are you sure you want to continue connecting (yes/no)? [yes] yes
mkdir /nfs/site/home/msveetil/.ssh: Permission denied at /usr/intel/pkgs/perl/5.8.5/lib/site_perl/5.8.5/Net/SSH/Perl/Util/Hosts.pm line 5

Upvotes: 0

Views: 316

Answers (1)

Raghuram
Raghuram

Reputation: 3967

Better connect to the host using ssh from command prompt and see whether you are getting this error. Also in ssh for the first time the finger print prompt comes and as you press yes it wont come again.If you get the error again it means the .ssh folder dosen't have permissions.

Upvotes: 3

Related Questions