[GH-ISSUE #130] How to SSH to the client using go-http-tunnel implementation #76

Closed
opened 2026-05-05 10:59:53 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @LiveEarth on GitHub (Apr 18, 2021).
Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/130

Hello team, @mmatczuk I follow your instruction and create server and client side part of go-http-tunnel (implemented ./tunneld and ./tunnel)
Everything works fine, but don't know how to use ssh tunnel option:

server_addr: SERVER_IP:5223
tunnels:
  webui:
    proto: http
    addr: localhost:8080
    auth: user:password
    host: webui.my-tunnel-host.com
  ssh:      <== HOW TO USE THIS OPTION?
    proto: tcp
    addr: 192.168.0.5:22
    remote_addr: 0.0.0.0:22

My question are how to use go-http-tunnel to SSH to the client?

Best regards, be healthy

Originally created by @LiveEarth on GitHub (Apr 18, 2021). Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/130 Hello team, @mmatczuk I follow your instruction and create server and client side part of go-http-tunnel (implemented ./tunneld and ./tunnel) Everything works fine, but don't know how to use ssh tunnel option: server_addr: SERVER_IP:5223 tunnels: webui: proto: http addr: localhost:8080 auth: user:password host: webui.my-tunnel-host.com ssh: <== HOW TO USE THIS OPTION? proto: tcp addr: 192.168.0.5:22 remote_addr: 0.0.0.0:22 My question are how to use go-http-tunnel to SSH to the client? Best regards, be healthy
Author
Owner

@LiveEarth commented on GitHub (Apr 24, 2021):

No answer from developer

<!-- gh-comment-id:826140056 --> @LiveEarth commented on GitHub (Apr 24, 2021): No answer from developer
Author
Owner

@mfoe87 commented on GitHub (Dec 29, 2021):

change remote_addr to something like 0.0.0.0:2222 in your client config. This will bind port 2222 on the server. After that you connect to ssh like you normally do

$ ssh user@127.0.0.1 -p 2222
That will connect to whatever the client is configured to, in your case it means 192.168.0.5:22

So if you have a lot of connections make sure you have free ports available on the server

<!-- gh-comment-id:1002357855 --> @mfoe87 commented on GitHub (Dec 29, 2021): change remote_addr to something like 0.0.0.0:2222 in your client config. This will bind port 2222 on the server. After that you connect to ssh like you normally do `$ ssh user@127.0.0.1 -p 2222` That will connect to whatever the client is configured to, in your case it means `192.168.0.5:22` So if you have a lot of connections make sure you have free ports available on the server
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/go-http-tunnel#76
No description provided.