0
votes

I follow this page to SELF HOSTED ngrok on my server (ngrok 1.7)
https://www.svenbit.com/2014/09/run-ngrok-on-your-own-server/

ATM, I can use the http protocol normally.
However, I want to use the ssh (tcp protocol) as well.
When try with below command

./ngrok -config=ngrok.cfg -proto tcp 22

ngrok
(Ctrl+C to quit)

Tunnel Status online
Version 1.7/1.7
Forwarding tcp://tunnel.mydomain.com:38005 -> 127.0.0.1:22
Web Interface 127.0.0.1:4040

# Conn 0

Avg Conn Time 0.00ms


The url format is quite differrent from provided ngrok (v2.x).

Forwarding tcp://0.tcp.ngrok.io:36428 -> localhost:22

I think that the ssh is exposed correctly but have no idea how to connect. Can you please show me the exact command to connect?

I try with below command but cannot success

ssh [email protected] -p 38005

ssh: connect to host tunnel.mydomain.com port 38005: Connection timed out

1
Devote the question without reason does not help. Please elaborate when you do that. - Quang Nguyen

1 Answers

0
votes

It's due to the firewall issue. I have to open the port 38005 on ngrok server and ssh words flawlessly (with above command).

However, it's not a good idea that we have to open the port that base on the previous ngrok commmand. Do you guys know whether we can fix the port for tcp request?