<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl-SSH &amp;amp; permissions in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622403#M104745</link>
    <description>Well, ssh works as before, asks for a password. Perl does not authenticate. I think I have to find a book for ssh to check what are all the options in the config-file for.&lt;BR /&gt;If I succeed I will post.&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
    <pubDate>Fri, 09 Sep 2005 05:40:20 GMT</pubDate>
    <dc:creator>Kalin Evtimov</dc:creator>
    <dc:date>2005-09-09T05:40:20Z</dc:date>
    <item>
      <title>Perl-SSH &amp; permissions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622398#M104740</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;I have a small problem with ssh. I am using the Perl-SSH module to connect to a server and runa  command. But I get:&lt;BR /&gt;&lt;BR /&gt;Permission denied (publickey,gssapi,password,keyboard-interactive).&lt;BR /&gt;&lt;BR /&gt;problem is that I don't know how to create this public key and how to use it in my code. It would be great if somebody can show me a link to read or a small example. Here is my code(same as example):&lt;BR /&gt;_______________________________&lt;BR /&gt;#! /opt/perl5/bin/perl&lt;BR /&gt;&lt;BR /&gt;use Net::SSH qw(sshopen2);&lt;BR /&gt;  use strict;&lt;BR /&gt;&lt;BR /&gt;  my $user = "root";&lt;BR /&gt;  my $host = "hpserv";&lt;BR /&gt;  my $cmd = "ls";&lt;BR /&gt;&lt;BR /&gt;  sshopen2("$user\@$host", *READER, *WRITER, "$cmd") || die "ssh: $!";&lt;BR /&gt;&lt;BR /&gt;  while (&lt;READER&gt;) {&lt;BR /&gt;      chomp();&lt;BR /&gt;      print "$_\n";&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;  close(READER);&lt;BR /&gt;  close(WRITER);&lt;BR /&gt;&lt;BR /&gt;______________________________&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;/READER&gt;</description>
      <pubDate>Fri, 09 Sep 2005 04:03:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622398#M104740</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-09-09T04:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Perl-SSH &amp; permissions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622399#M104741</link>
      <description>You need to setup keys such that this works from the shell: -&lt;BR /&gt;&lt;BR /&gt;host1# ssh root@host2 ls&lt;BR /&gt;&lt;BR /&gt;To do this: -&lt;BR /&gt;&lt;BR /&gt;On host1: -&lt;BR /&gt;&lt;BR /&gt;cd ~/.ssh&lt;BR /&gt;shh-keygen -f id.rsa -t rsa&lt;BR /&gt;(enter a blank passphrase when asked)&lt;BR /&gt;&lt;BR /&gt;copy the contents of the public key file id.rsa.pub to host2, then&lt;BR /&gt;&lt;BR /&gt;On host2: -&lt;BR /&gt;&lt;BR /&gt;cat id.rsa.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Basically you are generating an id.rsa and id.rsa.pub on the "local" machine, then adding the public key to the authorized_keys list on the "remote" host, to allow access.&lt;BR /&gt;&lt;BR /&gt;This procedure assumes you have a ~/.ssh directory on each host.  If you do not, then simply ssh somehost on each box and this will create it with the correct permissions.</description>
      <pubDate>Fri, 09 Sep 2005 04:09:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622399#M104741</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-09-09T04:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Perl-SSH &amp; permissions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622400#M104742</link>
      <description>Ok, now I have generated the keys on host and added the public key on the remote machine, but  the script shows the sme errormessage. When I use ssh from the shell, I must type the password, and within the script there is no password..that is confusing me.</description>
      <pubDate>Fri, 09 Sep 2005 04:59:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622400#M104742</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-09-09T04:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Perl-SSH &amp; permissions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622401#M104743</link>
      <description>Check your ssh daemon config file /opt/ssh/etc/sshd_config and make sure you don't have the option&lt;BR /&gt;&lt;BR /&gt;PubkeyAuthentication no&lt;BR /&gt;&lt;BR /&gt;This will disallow public key authentication.&lt;BR /&gt;&lt;BR /&gt;It this is set to yes (or commented out, yes is the default value), then check syslog for any errors.  Chances are it's something like directory permissions (sshd is fussy about home directory permissions as well as .ssh directory and authorized_keys/id_rsa files etc).&lt;BR /&gt;&lt;BR /&gt;Please post any relevant error messages.</description>
      <pubDate>Fri, 09 Sep 2005 05:04:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622401#M104743</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-09-09T05:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Perl-SSH &amp; permissions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622402#M104744</link>
      <description>Very important for ssh is the file and directory permissions&lt;BR /&gt;&lt;BR /&gt;# chown -R logname ~/.ssh&lt;BR /&gt;# chmod 700 ~/.ssh&lt;BR /&gt;# chmod 600 ~/.ssh/*&lt;BR /&gt;# chmod +r ~/.ssh/*.pub&lt;BR /&gt;&lt;BR /&gt;On both machines&lt;BR /&gt;Then please check if it works from the command prompt with ssh and scp before digging into perl failures&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 09 Sep 2005 05:14:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622402#M104744</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-09-09T05:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Perl-SSH &amp; permissions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622403#M104745</link>
      <description>Well, ssh works as before, asks for a password. Perl does not authenticate. I think I have to find a book for ssh to check what are all the options in the config-file for.&lt;BR /&gt;If I succeed I will post.&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
      <pubDate>Fri, 09 Sep 2005 05:40:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622403#M104745</guid>
      <dc:creator>Kalin Evtimov</dc:creator>
      <dc:date>2005-09-09T05:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Perl-SSH &amp; permissions</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622404#M104746</link>
      <description>I found a few challenges trying to setup passwordless ssh sessions between systems.  Enclosed is a cookbook I created to summarize what I found worked on HPUX.  I hope it helps</description>
      <pubDate>Sun, 11 Sep 2005 17:03:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-ssh-amp-permissions/m-p/3622404#M104746</guid>
      <dc:creator>Emil Velez</dc:creator>
      <dc:date>2005-09-11T17:03:24Z</dc:date>
    </item>
  </channel>
</rss>

