Rsync error

this rsync from one day to the other simply no longer works, the key is ok, permissions and other ... with the same key can not connect via SSH which shows that there are no errors, but rsync it just does not work. :confused:

root@san [~]# rsync -avz -e "ssh -p 22 -i /root/.ssh/rsync" root@XXXX.XXXX.XXXX:/root/log/load* /root/log/

on the server that I try to connect it receives the normal input access but then I cancel and the warning that was disconnected by the user.In other servers work as usual worked in that.

Sep  3 15:02:30 ns515801 sshd[725640]: pam_unix(sshd:session): session opened for user root by (uid=0)
Sep  3 15:02:31 ns515801 sshd[725640]: Received disconnect from XXXXXXX: 11: disconnected by user

what you think of strange, but do not know how it was before, iptables stop despite it continues running only without rules. (On the server where the file is to try to bring a file rsync)

:eek:

[root@ns515801 log]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:  iptable_nat iptable_filter ip[FAILED]t iptable_filter ip_tables
[root@ns515801 log]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

[root@ns515801 log]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:  iptable_nat iptable_filter ip[FAILED]t iptable_filter ip_tables

using the same key to access a server to another it usually accesses

ssh -i /root/.ssh/rsync -p 22 -l root XXX.XXX.XXX

now when I stop iptables on the source server, which I call the file rsync it of the status of the iptables stopped normally.

root@san [~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter nat      [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
root@san [~]# service iptables status
iptables: Firewall is not running.

Can someone help me please. :b:

Thank you very much.

Please provide some clarity to your question.

Does this mean it works intermittently or that it did work and no longer works?

It sounds like you are having an ssh issue and not necessarily an rsync issue? It is not clear in your post if turning off the firewall fixes the issue or not. If not, does root's home directory and .ssh subdirectory on the remote system have permissions of 700?

He worked without any problem from one day to the other stopped working.

Permission is 700 yes.

I'm turning off the firewall but when the status says he's still running, I'm not able to effectively stop iptables

the key for ssh access works (no password) with the same key that should work in rsync (which always worked)

I've checked the permissions, have created a new key and simply does not work.

I do not know what to test to find the problem.

what do you suggest? Thank you very much.

you can try adding more verbosity to the rsync output. just add more v's.

rsync -azvv ...

Guys, I'm going to give you feedback on the problem, I got it sorted out.

The permissions, keys, firewall, iptables were all correct.

The problem was the motd that was locking rsync.

I removed the motd and it worked again, then I found it

     --no-motd               suppress daemon-mode MOTD (see caveat)

thank you all

1 Like