With shell's pipe, cat & ssh, this is what I've come up with :
ssh bob@server-A.example.com "cat /source/file-or-directory.txt" | \ ssh bob@server-B.example.com "cat > /destination/file-or-directory.txt"
Shalom !!!
ssh bob@server-A.example.com "cat /source/file-or-directory.txt" | \ ssh bob@server-B.example.com "cat > /destination/file-or-directory.txt"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The RSA host key for domain-name.com has changed, and the key for the according IP address xxx.xxx.xxx.xxx is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is 00:00:00:00:00:00:00:00:00:00:00:00:. Please contact your system administrator. Add correct host key in ~/.ssh/known_hosts to get rid of this message. Offending key in ~/.ssh/known_hosts:xx RSA host key for domain-name.com has changed and you have requested strict checking.Host key verification failed.lost connection
Permission denied (publickey).Checked log file and got,
sshd: Authentication refused: bad ownership or modes for directory /user/home/directory