Skip to content

SSH Tunneling

Sliplane offers two ways to connect to services via SSH:

SSH tunneling is ideal when you need to:

  • Access private databases from outside the network
  • Use SCP or rsync to transfer files
  • Set up port forwarding to local development environment
  • Connect to multiple private services through a single entry point

Deploy the SSH Tunnel preset. You can keep all the default settings:

SSH Tunnel

After deploying the service (should take <15 seconds), you will find the port, host, and password in the service details.

Copy the host and port and use the following command to connect to your service:

Terminal window
ssh root@<your-subdomain>.sliplane.app -p 2222

It will ask for the password you set in your environment variables.

To use SSH key authentication instead of password:

  1. Copy your existing SSH public key (usually found at ~/.ssh/id_rsa.pub):

    Terminal window
    cat ~/.ssh/id_rsa.pub
  2. Add the public key to your SSH tunnel service:

    • Navigate to your SSH tunnel service in Sliplane
    • Go to the “Environment Variables” section
    • Add a new environment variable:
      • Key: SSH_AUTHORIZED_KEYS
      • Value: Paste your entire public SSH key
  3. Update authentication method:

    • Remove the ROOT_PASSWORD environment variable if you only want key-based authentication
    • Or keep both for dual authentication methods
  4. Restart the service to apply changes

  5. Connect using your SSH key:

    Terminal window
    ssh root@<your-subdomain>.sliplane.app -p 2222

    No password prompt will appear if your key is correctly configured.

For implementation details, see the Github Repository.

Once you are connected, you are in the same network as all your private services. You will be able to reach them via their service name.

You can also tunnel other private services to localhost by using port forwarding.

Terminal window
ssh -L 8080:<your-app.internal>:<your-app-port> root@<your-subdomain>.sliplane.app -p 2222

Here port 8080 on your local machine will be forwarded to port your-app-port on your service. The ports as well as the host are configurable and depend on the service you want to reach.

If you want to have console access to your service you will have to install a SSH server on the service you want to access. To learn how to do that, check out the SSH Server repository.