gg gg234
2005-Dec-09 10:48 UTC
rsync error - error in rsync protocol data stream (code 12) at io.c(420)
Hi, When i try to run rsync command from command linne it is working fine.Belowis the command /usr/bin/rsync --compress \ --verbose \ --rsh=ssh \ --times \ --owner \ --group \ --ignore-times \ --links \ --perms \ --recursive \ --size-only \ --delete \ --force \ --numeric-ids \ --stats \ /etc \ root@target_machine:/home/backup/thismachine/ when i try to use shell script for this #! /bin/bash /usr/bin/rsync --compress \ --verbose \ --rsh=ssh \ --times \ --owner \ --group \ --ignore-times \ --links \ --perms \ --recursive \ --size-only \ --delete \ --force \ --numeric-ids \ --stats \ /etc \ root@target_machine:/home/backup/thismachine/ I am getting the following error ssh: connect to host x.x.x.x port 22: No route to host rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(420) this is related to ssh i believe.But when i try to use from the command prompt it is working without any problem through ssh Please some one help me how to fix this error in shell script.Because i want to schedule this from cron Thanks for your time -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Paul Slootman
2005-Dec-09 15:18 UTC
rsync error - error in rsync protocol data stream (code 12) at io.c(420)
On Fri 09 Dec 2005, gg gg234 wrote:> > ssh: connect to host x.x.x.x port 22: No route to host > rsync: connection unexpectedly closed (0 bytes received so far) [sender] > rsync error: error in rsync protocol data stream (code 12) at io.c(420) > > this is related to ssh i believe.But when i try to use from the command > prompt it is working without any problem through sshPerhaps you have some host-specific options in ~/.ssh/config that aren''t picked up when running from cron? Or there''s some hidden character after one of the backslashes, or something like that... Try putting it all on one line in the script. Paul Slootman
gg gg234
2005-Dec-09 16:28 UTC
rsync error - error in rsync protocol data stream (code 12) at io.c(420)
thanks for your reply.I have tried that also but still getting the same error On 09/12/05, Paul Slootman <paul@debian.org> wrote:> > On Fri 09 Dec 2005, gg gg234 wrote: > > > > ssh: connect to host x.x.x.x port 22: No route to host > > rsync: connection unexpectedly closed (0 bytes received so far) [sender] > > rsync error: error in rsync protocol data stream (code 12) at io.c(420) > > > > this is related to ssh i believe.But when i try to use from the command > > prompt it is working without any problem through ssh > > Perhaps you have some host-specific options in ~/.ssh/config that aren''t > picked up when running from cron? > > Or there''s some hidden character after one of the backslashes, or > something like that... Try putting it all on one line in the script. > > > Paul Slootman >-------------- next part -------------- HTML attachment scrubbed and removed