use it like ssh r 80:localhost:8888 serveo.net.
when you establish an ssh connection to serveo.net, a subdomain will be assigned to forward http (and https) traffic to your local server.
basic usage looks like this:
ssh r 80:localhost:8888 serveo.net
the r option instructs your ssh client to request port forwarding from the server and proxy requests to the specified host and port (usually localhost). a subdomain of serveo.net will be assigned to forward http traffic.
multiple port forwards can be requested at once:
ssh r 80:localhost:8888 r 80:localhost:9999 serveo.net
the target server doesn't have to be on localhost:
ssh r 80:example.com:80 serveo.net
the subdomain is chosen deterministically based on your ip address, the provided ssh username, and subdomain availability, so you'll often get the same subdomain between restarts. you can also request a particular subdomain (from a set list):
ssh r incubo:80:localhost:8888 serveo.net ssh r incubo.serveo.net:80:localhost:8888 serveo.net
change the ssh username to get assigned a different subdomain:
ssh r 80:localhost:8888 [email protected]
ports other than 80 may be requested, and raw tcp traffic will be forwarded. (in this case, there's no way to route connections based on hostname, and the host, if specifed, will be ignored.)
ssh r 1492:localhost:1492 serveo.net
if port 0 is requested, a random tcp port will be forwarded:
ssh r 0:localhost:1492 serveo.net
pressing g will start a gui session. use up and down arrow keys to inspect requests/responses, and left and right arrow keys to switch between request and response views. use j, k, u, d, p, and n to scroll the lower inspector pane. press r to replay the selected request. press h or ? at any time for help.