I often SSH into a cluster node for work and after processing want to pull several results back to my local machine for analysis. Typically, to do this I use a local shell to scp from the server, but this requires a lot of path manipulation. I'd prefer to use a syntax like interactive FTP and just 'pull' files from the server to my local pwd.
Another possible solution might be to have some way to automatically set up my client computer as an ssh alias so that something like
scp results home:~/results
would work as expected.
Is there any obscure SSH trick that'll do this for me?
Working from grawity's answer, a complete solution in config files is something like
Host ex HostName ssh.example.com RemoteForward 10101 localhost:22
Host home HostName localhost Port 10101
which lets me do commands exactly like
scp results home:
transferring the file results to my home machine.