I'm setting up a crontab server to run several jobs to copy files from prod servers to lower environment servers.
I need the cron server job to copy files from one server to another. Here is what I have.
the ip's have been modified
ssh -v -R localhost:50000:22.214.171.124:22 -i host1key.pem firstname.lastname@example.org 'rsync -e "ssh -i /home/ec2-user/host2key.pem -p 50000" -vuar /home/ec2-user/test.txt ec2-user@localhost:/home/ec2-user/test.txt'
I'm using two different pem keys and users. I would think this command would work but I get this error in the debug log. Here is more to it and only show the portion that is erroring. It connects to email@example.com successfully. But errors on the 126.96.36.199.
debug1: connect_next: host 188.8.131.52 ([184.108.40.206]:22) in progress, fd=7 debug1: channel 1: new [127.0.0.1]
debug1: confirm forwarded-tcpip
debug1: channel 1: connected to 220.127.116.11 port 22 Host key verification failed.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype firstname.lastname@example.org reply 0
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
debug1: channel 0: free: client-session, nchannels 2
debug1: channel 1: free: 127.0.0.1, nchannels 1
Transferred: sent 5296, received 4736 bytes, in 0.9 seconds
Bytes per second: sent 5901.2, received 5277.2
debug1: Exit status 12