August 04, 2020
Serveo is an SSH server just for remote port forwarding. When a user connects to Serveo, they get a public URL that anybody can use to connect to their localhost server. It is the most easiest way to get your local server to the internet all you need is an openssl installed and a code in your terminal. After pasting the code and hiting enter you will get a serveo.net subdomain like abc.serveo.net now you can use it for testing on different devices. 🎉
Copy the code below on your terminal
ssh -R 80:localhost:3000 serveo.net
(in place of 3000 enter the port number where your site is hosted locally)
Install the openssl from the link OpenSSL or from any other source.
Copy the code below on your command prompt
ssh -R 80:localhost:3000 serveo.net
(in place of 3000 enter the port number where your site is hosted locally)
ssh -R 80:localhost:3000 serveo.net
In the code above -R option nstructs 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. 3000 represents the port in which your website is running locally.
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 like:
ssh -R incubo.serveo.net:80:localhost:8888 serveo.net
Use ServerAliveInterval to prevent an idle connection from timing out:
ssh -o ServerAliveInterval=60 -R 80:localhost:8888 serveo.net