I recently was in a situation where I wanted to copy a file from one server to another.  The problem was that these two servers could not directly connect to each other, the one server that could talk to both endpoints did not have enough diskspace, and the only port open was ssh.  A collegue dropped a bit of knowledge on me.  Both endpoints of an scp command can be remote.  Who knew so this command from server B:

serverB:/ scp user@serverA:/file user@serverC:/file

Actually works.  I love linux. It’s awesome

Share