<br><br><div class="gmail_quote">On Fri, Jan 13, 2012 at 3:28 PM, David Tomaschik <span dir="ltr">&lt;<a href="mailto:david@systemoverlord.com">david@systemoverlord.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
You should have the public key in a file called authorized_keys on the<br>
server side.<br></blockquote><div><br>Yep! Easy tool is called ssh-copy-id &lt;user&gt;@&lt;hostname&gt;  will do the RightThing (tm) on the remote end.<br><br>Also you will need to edit the /etc/ssh/sshd_config file and change<br>
<br>#PubkeyAuthentication yes<br>#AuthorizedKeysFile    .ssh/authorized_keys<br><br>to<br><br>PubkeyAuthentication yes<br>AuthorizedKeysFile    .ssh/authorized_keys<br><br><br>For the back up process, you will want to put the key in the account of the backup user on the far machine (back up data storage system - wilma), not root user.<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
David<br>
<div><div class="h5"><br>
<br>
On Fri, Jan 13, 2012 at 3:06 PM, Tim Watts &lt;<a href="mailto:tim@cliftonfarm.org">tim@cliftonfarm.org</a>&gt; wrote:<br>
&gt; OK, I did an ssh-keygen for root and managed to copy its id_rsa.pub to<br>
&gt; $host:/root/.ssh.  (I have &quot;PasswordAuthentication no&quot; in my sshd_config<br>
&gt; so can&#39;t use ssh-copy-id.)  On the target host it shows this:<br>
&gt;<br>
&gt; $ sudo ls -l /root/.ssh/<br>
&gt; total 8<br>
&gt; -rw-r--r-- 1 root root 396 <a href="tel:2012-01-13%2014" value="+12012011314">2012-01-13 14</a>:36 id_rsa.pub<br>
&gt; -rw-r--r-- 1 root root 884 2010-11-28 13:36 known_hosts<br>
&gt;<br>
&gt; On my local machine I have this:<br>
&gt;<br>
&gt; # ls -l /root/.ssh<br>
&gt; total 12<br>
&gt; -rw------- 1 root root 1743 <a href="tel:2012-01-13%2014" value="+12012011314">2012-01-13 14</a>:25 id_rsa<br>
&gt; -rw-r--r-- 1 root root  396 <a href="tel:2012-01-13%2014" value="+12012011314">2012-01-13 14</a>:25 id_rsa.pub<br>
&gt; -rw-r--r-- 1 root root  884 2009-11-11 06:17 known_hosts<br>
&gt;<br>
&gt; The timestamp difference is due to copying it to my home before scp-ing<br>
&gt; it to the target host.<br>
&gt;<br>
&gt; And yet:<br>
&gt;<br>
&gt; # ssh timtw@blueberry<br>
&gt; Permission denied (publickey).<br>
&gt; # ssh blueberry<br>
&gt; Permission denied (publickey).<br>
&gt;<br>
&gt; My sshd_config has &quot;PermitRootLogin yes&quot;.  What else could I be missing?<br>
&gt;<br>
&gt;<br>
&gt; On Fri, 2012-01-13 at 13:56 -0500, Jim Kinney wrote:<br>
&gt;&gt; root user needs to do a keygen and put the pub on wilma.<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Jan 13, 2012 at 1:40 PM, Tim Watts &lt;<a href="mailto:tim@cliftonfarm.org">tim@cliftonfarm.org</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;         On Fri, 2012-01-13 at 11:51 -0500, Jim Kinney wrote:<br>
&gt;&gt;         &gt; root on fred goes to fredbak on wilma<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         Just to be clear: does this mean that the backup job runs as<br>
&gt;&gt;         root but<br>
&gt;&gt;         rsyncs as fredbak (via ssh key) to wilma?  As in:<br>
&gt;&gt;<br>
&gt;&gt;                # rsync $OPTS $SRC fredbak@$TGTHOST:$DST<br>
&gt;&gt;<br>
&gt;&gt;         I get an error when I try to do something similar:<br>
&gt;&gt;<br>
&gt;&gt;         OPTS=&quot;-az --delete-during --delete-delay -h --progress<br>
&gt;&gt;         --stats&quot;<br>
&gt;&gt;<br>
&gt;&gt;         # rsync $OPTS /etc /home/timtw<br>
&gt;&gt;         timtw@blueberry:/home/timtw/backups/dellberry<br>
&gt;&gt;         Permission denied (publickey).<br>
&gt;&gt;         rsync: connection unexpectedly closed (0 bytes received so<br>
&gt;&gt;         far) [sender]<br>
&gt;&gt;         rsync error: unexplained error (code 255) at io.c(601)<br>
&gt;&gt;         [sender=3.0.7]<br>
&gt;&gt;         #<br>
&gt;&gt;<br>
&gt;&gt;         I am able to ssh to blueberry via my ssh key when I&#39;m timtw<br>
&gt;&gt;         but not as<br>
&gt;&gt;         root.  Is my key in the wrong place?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         _______________________________________________<br>
&gt;&gt;         Ale mailing list<br>
&gt;&gt;         <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt;&gt;         <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt;&gt;         See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt;&gt;         <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; --<br>
&gt;&gt; James P. Kinney III<br>
&gt;&gt;<br>
&gt;&gt; As long as the general population is passive, apathetic, diverted to<br>
&gt;&gt; consumerism or hatred of the vulnerable, then the powerful can do as<br>
&gt;&gt; they please, and those who survive will be left to contemplate the<br>
&gt;&gt; outcome.<br>
&gt;&gt; - 2011 Noam Chomsky<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Ale mailing list<br>
&gt;&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt;&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Ale mailing list<br>
&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
</div></div>David Tomaschik, RHCE, LPIC-1<br>
System Administrator/Open Source Advocate<br>
OpenPGP: 0x5DEA789B<br>
<a href="http://systemoverlord.com" target="_blank">http://systemoverlord.com</a><br>
<a href="mailto:david@systemoverlord.com">david@systemoverlord.com</a><br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br><br>As long as the general population is passive, apathetic, diverted to 
consumerism or hatred of the vulnerable, then the powerful can do as 
they please, and those who survive will be left to contemplate the 
outcome.<br>- <i><i><i><i>2011 Noam Chomsky<br><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i><br>