Discussion:
Simple ways to test ssh tunnel
Mathieu Westphal
2018-10-05 09:23:49 UTC
Permalink
Hello List,

I'm not enterelly sure that I'm on the rist place to ask this question,
sorry if not.
The question is simple, *how to test simply a ssh tunnel ?*

I just want to make sure the the tunnel i'm opening is letting information
goes through it without problem, and I want to avoid any other point of
failure when testing.

for example let's say I run

ssh -L 8080:localhost:11111 ***@remote

What command could I then use to use this tunnel as simply as possible,
either on the client, the server or both.

Thanks,

Mathieu Westphal
Darren Tucker
2018-10-05 10:18:06 UTC
Permalink
On 5 October 2018 at 19:23, Mathieu Westphal
<***@kitware.com> wrote:
[...]
Post by Mathieu Westphal
What command could I then use to use this tunnel as simply as possible,
either on the client, the server or both.
On the client, "telnet localhost 8080". If it connects, depending on
what's on the other end either you'll get a banner or it'll wait for
the client to send something. If it speaks HTTP. you can type
something like "GET /" and it'll probably give either a page or an
error message.
--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
Damien Miller
2018-10-05 11:26:15 UTC
Permalink
Post by Darren Tucker
On 5 October 2018 at 19:23, Mathieu Westphal
[...]
Post by Mathieu Westphal
What command could I then use to use this tunnel as simply as possible,
either on the client, the server or both.
On the client, "telnet localhost 8080". If it connects, depending on
what's on the other end either you'll get a banner or it'll wait for
the client to send something. If it speaks HTTP. you can type
something like "GET /" and it'll probably give either a page or an
error message.
You can also use netcat instead of telnet, or perhaps "openssl s_client"
if your endpoint requires TLS.

-d
Mathieu Westphal
2018-10-05 12:29:04 UTC
Permalink
Thank you very much, telnet is indeed the simplest way, I should have think
of it.

Also, the simplest way to have a http server running is with python
python -m http.server will work just fine.

Mathieu Westphal
Post by Damien Miller
Post by Darren Tucker
On 5 October 2018 at 19:23, Mathieu Westphal
[...]
Post by Mathieu Westphal
What command could I then use to use this tunnel as simply as possible,
either on the client, the server or both.
On the client, "telnet localhost 8080". If it connects, depending on
what's on the other end either you'll get a banner or it'll wait for
the client to send something. If it speaks HTTP. you can type
something like "GET /" and it'll probably give either a page or an
error message.
You can also use netcat instead of telnet, or perhaps "openssl s_client"
if your endpoint requires TLS.
-d
Loading...