[CentOS] rsync question

Bowie Bailey Bowie_Bailey at BUC.com
Fri Sep 11 15:06:59 UTC 2015


On 9/11/2015 10:34 AM, Robert Moskowitz wrote:
>
>
> On 09/11/2015 10:21 AM, C Linus Hicks wrote:
>>   On 09/10/15, Robert Moskowitz wrote:
>>
>> --------------- Quoted text ------------------
>> SSh is not parsing the port the way http does, it seems:
>>
>> $ rsync -ah --stats root at 192.168.129.2:613:/etc/dhcp/
>> /home/rgm/data/htt/httnet/homebase/new/dhcp
>> ssh: connect to host 192.168.129.2 port 22: No route to host
>> rsync: connection unexpectedly closed (0 bytes received so far) 
>> [Receiver]
>> rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.1]
>>
>> The reason why I change my SSH port is a simple way to keep port knocker
>> robots away. Different hosts use different ports...
>>
>> ------------------ End quote --------------------
>>
>> Oh, right, so you either need to put that in your .ssh/config file or 
>> use -e 'ssh -p 613' on the rsync command.
>>
>> The config file should look like this:
>> Host 192.168.129.2
>>       Port 613
>
> So we end up back needing the -e option or modifying the config file.
>
> thanks for your time.  Really.

It's fairly common on technical lists like this for people to become 
fixated on minor problems or inefficiencies in a command or 
configuration when the actual issue is more complicated.  Try not to let 
it bother you too much.

As for your original question, I'm not sure why the files weren't copied 
as expected.  I ran your exact command with only the server names, port, 
and destination directory changed and all the files were copied.  You 
can try running the command without a destination and it should return a 
list of files found in the source directories.  If it doesn't list 
everything, there is some problem with how the source files are being 
specified or something preventing them from being read.  Selinux is 
always suspected in cases of strange permission problems.

-- 
Bowie



More information about the CentOS mailing list