Long-running Persistent Tunnels

You can use Pinggy to host websites, apps, and files from localhost just like any server. You just need to ensure the following:

  1. Get a persistent subdomain or a custom domain from the dashboard.
  2. Generate an ssh key. Run ssh keygen command in the terminal / command prompt. Press Enter / Return key till the command finishes executing.
  3. Use the token to start the tunnel as described next.

The following command ensures that your tunnels stay alive and restart on its own if something goes wrong:

# pinggy.sh

while true;
    do ssh -p 443 -o ServerAliveInterval=60 -R0:localhost:8000 token@a.pinggy.io;
    sleep 2;
done
# pinggy.sh

while true;
    do ssh -p 443 -o ServerAliveInterval=60 -R0:localhost:8000 token@a.pinggy.io;
    sleep 2;
done
# pinggy.bat

FOR /L %N IN () DO ssh -p 443 -o ServerAliveInterval=60 -R0:localhost:8000 token@a.pinggy.io

Replace 8000 with the port you want to share, and token with your tunnel token.