Setting up an SSH tunnel

On the machine example there is a (tcp/ip) program listening on port 12345. The protocol it talks is some plaintext language. I want to talk with it, but i don’t want others to know what i’m sending to it. I’m lucky enough to have remote access to that machine via ssh. I setup a tunnel with the following command:

ssh -N -L 12345:example:12345 timvw@example

Now my program can connect to localhost:12345 and ssh will make sure that it ends up at example.:12345 without others being able to see the actual data :) For windows users i suggest that you take a look at Plink.

  1. So this is a SSH tunnel, not SSL.

  2. You are absolutely right. I have modified the title and permalink from ssl tunnel to ssh tunnel.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>