Hi. I have three servers - lets say - clo1, bh1, wal1. I log in to first one using username and ssh key, to second I use login and password. Last is local server in my company. Each under Linux Ubuntu. I send data from wal1 to bh1 using rsync (I added ssh key to authorized_keys file on bh1 server on wallramcte account): Code: rsync -avz -e "ssh -p 33222" /var/lib/automysqlbackup/daily/wallram/ [email protected]:/home/wallramcte/backups/ This works perfectly. Unfortunately I will shutdown soon bh1 server and I would like to synchronize data this same way like above (I added ssh key to authorized_keys file on clo1 server on wallramcte_sh account). I used command: Code: rsync -avz -e "ssh -p 5688" /var/lib/automysqlbackup/daily/wallram/ [email protected]:/home/wallramcte_sh/backups/ but after maybe 30s I have message: Code: ssh: connect to host Y.Y.Y.Y port 5688: Connection timed out rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9] One difference between clo1 and bh1 is login technique. To clo1 is used login and ssh key authorize user but on bh1 is used login and password. How to bypass this? PS Both rsync commands executed on wal1 server.
https://ubuntuforums.org/showthread.php?t=2071941 https://www.linuxquestions.org/questions/linux-newbie-8/rsync-with-ssh-syntax-4175465886/ https://community.netgear.com/t5/Backing-up-to-your-ReadyNAS/SOLVED-SSH-rsync-error/td-p/893305 https://debianforum.de/forum/viewtopic.php?t=159371 --> basically: does the /home/$username folder exist? https://serverfault.com/questions/5...ror-for-with-rsync-for-relatively-large-files nothing applies? ( there is more on google )
Obviously you cannot rsync simply because it requires a password. Though there is other way around, the best is just add the ssh key like you added to the other one.
Yes and as I mentioned above I added ssh key but there is some problem. I suppose the source of this problem is authorization. I log into one server using ssh cert (without password, I just put root in putty console) and here it does not work. On second server with logging using root and password I can do it without any problem after adding ssh key to authorized_keys file. PS I will check the links from @ztk.me soon. From 6th Juni I have incredibly much work in my job.