Roots Discourse

Unable to ssh to the server with ssh web@namewebsite.com, but ok with the ssh web@ip-number

I am unable to ssh to the server with ssh web@namewebsite.com but I can access with the IP ssh web@xx.xx.xxx

what can be the problem?
my domain still doesn’t point to this server, could it be the problem?

I tried to destroy and create new droplets multiple times, but I have the same error.
is there a file or a setting that I need to overwrite?

I left the trellis settings as new, I just added the passwords in place and add the host in the hosts file.
these are my settings

I can access the staging with shh web@namewebsite.com without any problems.

What I am doing wrong?
thanks

Does dig namewebsite.com (same console as you connect via SSH) resolve to an IP and to the right IP?
Does your internet connection support IPv6?

as I said, I didn’t update the DNS yet, so the domain still points to a different IP.
this because I would like to update the DNS record, only when I am sure that everything works well.

does ssh web@namewebsite.com need the right DNS setup in order to work?

if yes, I think that this answered my question, in the meantime I can access with ssh web@ip, and then as soon as I will update the DNS, I can access with ssh web@namewebsite.com

I don’t know if my internet connection support IPv6, but I didn’t have similar problems with other trellis projects, so I reckon this is not the problem. (at least I hope :crossed_fingers:)

thanks

You can always add a host-IP pair to /etc/hosts until the new DNS records propagated.

1 Like

I can ssh into the server with shh web@nameofthewebsite.com, as soon as I pointed the DNS.

I had the feeling that I didn’t need this to access the server, I learnt a lesson for the next time.

thanks!

1 Like