SSH -R is even cooler than -L


To be honest with you, I thought for three years now that the -L option of ssh is a cool thing. It connects to the ssh server and offers a remote service (port) locally. Call it port tunnelling. Great against firewalls.

Anyway, consider you have a ssh server in the internet, and two computers behind different firewalls that only let traffic out. But you want to connect from computer A to computer B.
So you could connect to the ssh server from both computers, but you would need some software that reverses your TCP flow. One of the channels has to be the client and one the server. That might even be possible just using pipes and ssh -L.

Ok, so I thought I was clever until I found the -R option.
What it does is to connects to the ssh server and offers a local service (port) remotely. (-L offers a remote service (port) locally.)
Consequent. And works nicely too!

  1. No comments yet.
(will not be published)

  1. No trackbacks yet.