Here you can see how configurate your computer and server to login to your SSH server without password.
1.- Buy a domain
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.- Create a Cloudflare account and add your domain
When you have your domain, you need to create a Cloudflare account and add your domain to it. You can follow the Cloudflare guide to do it, but it's very easy.
Once you have added your domain, you need to change the nameservers of your domain to the Cloudflare ones (it appears in the process of adding the domain).
3.- Create a Cloudflare Tunnel
Go to the main dashboard of your Cloudflare account and click on the Zero Trust
option, after that, click on Access
> Tunnels
and then click on Create a Tunnel
.
4.- Install cloudflared
If you are using Linux, here you can see the apt repositories and commands installation:
5.- Run cloudflared service
sudo cloudflared service install [TOKEN]
to update cloudflared service if you install it with apt repositories:
sudo apt update && sudo apt upgrade
sudo systemctl restart cloudflared.service
6.- Create hostnames
Go to the Tunnel that you have created and click on Add a public hostname
. Add the hostname that you want to use to access your server. If you select HTTPS remember to turn on the TLS
option No TLS Verify
.