Dear friend,<br>                  I have installed ubuntu 8.04 lts in two new machine and again i follow some steps.<br><br> Source pc ><br><br>1>  root@jiten-desktop:/root# ssh-keygen -t rsa <br>2>  i get id_rsa.pub and id_rsa both key in /root/.ssh folder.<br>
3>  ssh <a href="mailto:root@10.0.1.81">root@10.0.1.81</a> address in <b>destination pc</b> . login there <br>4> After that when i use scp command in destination pc to source pc <br>    " scp -r root@10.0.1.82:/root/.ssh/id_rsa.pub  (Source Pc)  root@10.0.1.81:/root/.ssh/    (Destination Pc)<br>
then it is giving me permision deny error. When i use scp command for copy.(when i run that command that time i am login in destination pc)<br><br>5> When i run scp command source to destination then it works.(With out ssh )<br>
6> scp -r  root@10.0.1.82:/root/.ssh/id_rsa.pub (source)  root@10.0.1.81:/root/.ssh   (destinection)<br>7> chmod 700 id_rsa.pub<br>8> vim /etc/ssh/sshd_config<br>9> PermitRootLogin = yes<br>10> /etc/init.d/ssh restart/reload/start in source pc and Destinetion pc.<br>
11> In a "souce pc" ssh <a href="mailto:root@10.0.1.81">root@10.0.1.81</a><br>         Then it is not asking for root password<br><b>AFTER THAT I RUN THAT COMMAND IN (DESTINATION PC)</b><br>12> when i run rsync -r -v -a -e ssh /home/common/Desktop (destination ) root@10.0.1.82:/home/common/Desktop (Source PC) <br>
         (when i copy destination "Desktop" to source "Desktop" ) then i get that error.<br><font size="3"><font color="#000000">root@common:/home/deepak# rsync -r -v -a -e /home/deepak/Desktop/ root@10.0.1.82:/common/Desktop<br>
rsync: Failed to exec /home/deepak/Desktop/backup: Permission denied (13)<br>rsync error: error in IPC code (code 14) at pipe.c(86) [receiver=2.6.9]<br>rsync: writefd_unbuffered failed to write 4 bytes [receiver]: Broken pipe (32)</font></font> <br>
<br>13> when i run rsync -r -v -a -e ssh /home/common/Desktop/java.pdf (Destination ) root@10.0.1.81:/home/common/Desktop (Source) <br>   When i run this command as a normal user then it gives following error.<br><br><font size="3"><font color="#000000">chandan@common:~$ rsync -r -v -a -e ssh /home/chandan/Desktop/test.css root@10.0.1.82:/home/common/Desktop<br>
The authenticity of host '10.0.1.82 (10.0.1.82)' can't be established.<br>RSA key fingerprint is 48:ec:7b:14:8a:7c:28:d1:71:54:67:f7:0f:4c:c7:73.<br>Are you sure you want to continue connecting (yes/no)? yes</font></font><br>
<br>14> When i run this command using root user then it is asking root password.<br>   then it is asking root password.<br>   SAME IN (DESTINATION ) TO (SOURCE)<br><br><br><br><div class="gmail_quote">On Thu, Jul 9, 2009 at 9:18 PM, Preston Kutzner <span dir="ltr"><<a href="mailto:shizzlecash@gmail.com">shizzlecash@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">jiten jha wrote:<br>
> Friends,<br>
>              As you told . I follow all steps again but when i run "rsync<br>
> ssh " command then it is asking root password.<br>
> Help me to solve that problem .<br>
><br>
<br>
</div>Do you have "PubkeyAuthentication yes" in your /etc/ssh/sshd_config file<br>
on your remote host?  It should be there by default if you're using<br>
Ubuntu on it.<br>
<br>
Also, just out of curiosity, did you set a password on your ssh key?<br>
When creating your ssh key it prompts for an *optional* password.  If<br>
you entered one in at the prompts, that might be the password it's<br>
asking for.  If you did provide a password when creating your ssh keys,<br>
and don't want to use a password with them, you'll have to re-generate<br>
your keys and just hit 'Return/Enter' at the password prompts.  This<br>
will create a set of keys that don't require a password.<br>
<div><div></div><div class="h5"><br>
>> In the above steps, you don't indicate which machines you're running<br>
>> those commands on.  It would help us figure out what your problem is if<br>
>> you provide that information.<br>
>><br>
>> One other possibility that would prevent ssh keys from working when<br>
>> connecting to a remote host is wrong file/directory permissions on the<br>
>> remote host.  The .ssh directory should have permissions 700 and the<br>
>> authorized_keys file should be permissions 644, both owned by the<br>
>> appropriate user.<br>
>><br>
>> You might also have better success following the steps below:<br>
>><br>
>> 1> You can skip steps 1-3 of the original steps you listed if you still<br>
>> have the keys you generated originally<br>
>><br>
>> 2> You'll want to make sure PermitRemoteLogin = yes is enabled in<br>
>> /etc/ssh/sshd_config and that you issue a sudo /etc/init.d/ssh restart<br>
>> on the remote box (if you changed the file) before proceeding to the<br>
>> next steps.<br>
>><br>
>> 3> Assuming you're copying the id_rsa.pub key from the local machine to<br>
>> a remote host, you want to use the command: 'scp <path_to>/id_rsa.pub<br>
>> <user>@<remote_host>:' (In the case you stated above, "scp<br>
>> <path_to>/id_rsa.pub <a href="mailto:root@10.0.0.91">root@10.0.0.91</a>:")<br>
>><br>
>> 4> Then, issue the command: ssh root@<remote_host> "if [ -d \".ssh\"];<br>
>> then cat id_rsa.pub >> .ssh/authorized_keys; else mkdir .ssh; chmod 700<br>
>> .ssh; cat id_rsa.pub >> .ssh/authorized_keys; fi"<br>
>><br>
>> NOTE QUOTES ABOVE:  The above command essentially logs in via ssh, runs<br>
>> the command(s) in quotes that follow the ssh login command, then closes<br>
>> the session after the command has completed.  Since the command you want<br>
>> run on the remote server must be in double-quotes on the local host, you<br>
>> must escape any quotes that will be part of the command run on the<br>
>> remote host.<br>
>><br>
>> Also, the above command checks for the existence of a .ssh directory in<br>
>> the user's home, if it exists it then cats out the ssh key to the<br>
>> authorized_keys file in .ssh (and creates the file if it doesn't exist).<br>
>>  If it does not find a .ssh directory, it creates one, sets the<br>
>> appropriate permissions, then cats the ssh key out to the<br>
>> authorized_keys file (again, creating the file if it doesn't exist).<br>
>><br>
>> 5> run the command: rsync -avr -e "ssh -i<br>
>> <path_to_home_dir>/.ssh/<ssh_key>" /path/on/local/machine<br>
>> user@host:/path/to/dest<br>
>><br>
>> PLEASE NOTE USE OF QUOTES IN ABOVE STEP, THIS IS IMPORTANT!  You can<br>
>> omit the -i <path_to_home_dir>/.ssh/<ssh_key> portion if using your<br>
>> user's default ssh key.  Otherwise, you must specify the ssh_key if<br>
>> you're using one different from the user's default.  Also, be mindful of<br>
>> trailing slashes in directory paths, as they do change the behavior of<br>
>> rsync.<br>
>><br>
>> Those steps should get you to where you need to be.  I tried to make<br>
>> them a little more generalized to be portable to any situation.<br>
>><br>
>> --<br>
>> ubuntu-users mailing list<br>
>> <a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
>> Modify settings or unsubscribe at:<br>
>> <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
>><br>
><br>
><br>
><br>
<br>
<br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Regards<br>Jitendra Jha<br>Jr. Linux System Administrator<br>Hotwax Media Inc., Indore<br>+91-9893325765<br><a href="http://www.hotwaxmedia.com">www.hotwaxmedia.com</a><br>