We use here argo tunnel to prevent exposing our ip.
First download cloudflared and login.
Now create your tunnel
cloudflared tunnel create ssh
Tunnel list shows you the ids.
cloudflared tunnel list
You can obtain more detailed information for each tunnel with `cloudflared tunnel info <name/uuid>`
ID NAME CREATED CONNECTIONS
234-3-4-2-43534 ssh 2022-02-10T09:01:13Z
Create a subfolder .cloudflared/
where you copy the tunnel config file like
234-3-4-2-43534.json
from your home folder ~/.cloudflared/234-3-4-2-43534.json
to.
Create a config file like ssh.yml and replace the servers host ip and the ids.
url: ssh://192.168.0.42:22
tunnel: 234-3-4-2-43534
credentials-file: /etc/cloudflared/234-3-4-2-43534.json
Now you can set a cname to 234-3-4-2-43534.argotunnel.com.