I have a domain name’s DNS configured with cloudflare that sets the A record to my public IP address (I’ve set DDNS so I can SSH onto my raspberry pi if my dynamic IP ever changes). However, for some reason I cannot seem to ssh onto my pi using my domain name.
This way works (both with my public or private IP on port 4321):
ssh firstname.lastname@example.org.***.*** -i ./.ssh/rpi_key -p 4321
However, for some reason this doesn’t work:
ssh email@example.com -i ./.ssh/rpi_key -p 4321
Why does this happen, and how can I get SSH to work using my domain name rather than IP? Cloudflare clearly points the IP to 2.127.. so I assume this should be completely identical.
Also, after browsing some other posts, they suggest running this command:
dig +short "mycustomdomain.co.uk" @18.104.22.168, which returns the following:
I’d assume it should return the IP associated with that domain name (my public IP, 2.127..), but instead it returns different IPs and 2 of them. Am I incorrect here? I can only assume otherwise they return the NS IPs of Cloudflare.
What am I not getting here? Thanks for any help