It often happens that I'm SSH'd into another machine and I'd like to download a file onto my local machine without having to open a new terminal and scp. For example, something like this:
local $ ssh remote
remote $ ls
remote_file
remote $ download remote_file
…
remote $ ^D
local $ ls
remote_file
Is there any way — even a terrible hack — to let me download a file while I'm SSH'd into the remote host, without using SCP?
I'd considered playing some tricks with, ex, $SSH_CLIENT
, but that won't work when my local machine is behind a NAT (which is basically all the time).