Skip to content
My GitHub Profile My Twitter Profile

[Clouflare Tunnel] Use SSH without opening ports

Here you can see how configurate your computer and server to login to your SSH server without password.

1.- Configure Cloudflare Tunnel

Click here to know how start your Cloudflare Tunnel

First of all, you need to buy a domain. You can buy it in any domain provider. I recommend you to use Google Domains or OVH.

2.- Add an SSH tunnel

Go to the Tunnel that you have created and click on Add a public hostname. Add the hostname and in the Service Type select SSH

3.- Install Cloudflared in your computer

If you are using Linux, here you can see the apt repositories and commands installation:

4.- Configure SSH

touch ~/.ssh/config

Edit the file and add the following lines:

Host [NAME]
    HostName [HOST]
    User [USERNAME]
    Port [PORT]
    IdentityFile ~/.ssh/id_rsa # If you have a key
    ProxyCommand cloudflared access ssh --hostname %h