1

I added two A DNS records on my domain name whose HOSTNAME is @ and www,

I'm wondering why I get refused when use davidzhu.xyz

$ ssh [email protected] 
ssh: connect to host davidzhu.xyz port 22: Connection refused

# This will success
$ ssh [email protected]
The authenticity of host 'www.davidzhu.xyz (144.202.12.21)' can't be established.
ED25519 key fingerprint is...

1 Answer 1

0

Seems to be working as expected. Both resolve to the same IP

dig davidzhu.xyz +short
144.202.12.32

dig www.davidzhu.xyz +short
144.202.12.32

ssh works as well

~
❯ ssh [email protected]
The authenticity of host 'davidzhu.xyz (144.202.12.32)' can't be established.
ED25519 key fingerprint is SHA256:NpOMboPt3497x7ISpCbqOf/oCu4FNMqtzcKQPELZvUw.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'davidzhu.xyz' (ED25519) to the list of known hosts.
[email protected]'s password:


~ took 10s
❯ ssh [email protected]
The authenticity of host 'www.davidzhu.xyz (144.202.12.32)' can't be established.
ED25519 key fingerprint is SHA256:NpOMboPt3497x7ISpCbqOf/oCu4FNMqtzcKQPELZvUw.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:64: davidzhu.xyz
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'www.davidzhu.xyz' (ED25519) to the list of known hosts.
[email protected]'s password:

My best guess is caching, was pointing to an old/stale IP

1
  • Can you try again now? It seems to me (coming from superuser.com/q/1781027/368970) that the domain is now under Cloudflare, maybe you had the old cached from before he added it to Cloudflare (while he had the www cached to also an old IP.) Commented Apr 26, 2023 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .