SSH tip: Automatic Reverse Tunnels for Workflow Simplification
codysoyland.com
codysoyland.com
# apt-get install sshfs
# sshfs server:/remote_dir /local_dir
I haven't tried it, but this may work with rsync as well.
Configure screen with
zmodem catch
and then ssh to the remote server from inside screen. If you found the file you wanted, issue sz <name of file> on the server. Screen will see the ZModem transfer and ask you where to store the file.
ssh -R localhost:2222:localhost:22 remote
scp -P 2222 /path/to/file localhost:~So I have something like
autossh -f -N -R 2222:localhost:22 home -S "none"
at my work machine(put into startup script), so I can always get back to the work machine from home.
Or, just write a script that forwards the port and run it before you start working.
(Note that it's not perfect: in particular, the first connection to a host remains open until all collections have been closed. This is being worked on, IIRC.)
Instead of all these hacks, it would be awesome to see support for in-session file transfer built into ssh/sshd.
scp $(ssh remote find -name 'fic.tar.gz') .
seems simpler. But of course there are another advantages to be able to contact the local computer from the remote.ssh -R 1234:privatecomputer:22 user@publicserver
So it's: secureshell, reversed, publicport to privatemachine:port, authentication+address for public machine.
Then traffic to publicserver:1234 should appear at privatecomputer:22
Perhaps there should be a nicer syntax like "ssh admin@publicserver.com:1234 => localhost:50"