grok -h Usage: ngrok [OPTIONS] <local port or address> Options: -authtoken="": Authentication token for identifying an ngrok.com account -config="": Path to ngrok configuration file. (default: $HOME/.ngrok) -hostname="": Request a custom hostname from the ngrok server. (HTTP only) (requires CNAME of your DNS) -httpauth="": username:password HTTP basic auth creds protecting the public tunnel endpoint -log="none": Write log messages to this file. 'stdout' and 'none' have special meanings -proto="http+https": The protocol of the traffic over the tunnel {'http', 'https', 'tcp'} (default: 'http+https') -subdomain="": Request a custom subdomain from the ngrok server. (HTTP only)
Advanced usage: ngrok [OPTIONS] <command> [command args] [...] Commands: ngrok start [tunnel] [...] Start tunnels by name from config file ngrok help Print help ngrok version Print ngrok version
Examples: ngrok start www api blog pubsub ngrok -log=stdout -config=ngrok.yml start ssh ngrok version
执行ngrok -proto=tcp 22进行tcp端口转发就可以在外网ssh到本机了
1 2 3 4 5 6
Tunnel Status online Version 1.7/1.7 Forwarding tcp://ngrok.com:45629 -> 127.0.0.1:22 Web Interface 127.0.0.1:4040 # Conn 0 Avg Conn Time 0.00ms