I have an own linux server (ngnix, gunicorn, python flask) connected it via dyndns to my frtizbox and to my domain and dyndns provider (selfhost.de). Now I would like to connect to this linux server using ssh like this:
ssh [email protected]
This means not with the ip addr cause this is changing in case of power breakdown or frit box restart.
I saw that there are services like ddclient. I set this service up but I do not know how to connect now using the above command: I still get this error:
ssh: connect to host domain_name.de port 22: No route to host
OS:
- Ubuntu server: 20.04 LTS
- Ubuntu Laptop I want to access the server with has: 18.04 LTS
Details: If I have both machines in the local network I already can access via:
ssh server_name@192.....
Next I tested with both machines having the same local network to connect with publich ip:
ssh [email protected]...... --> Error no route to host
I then allowed port 22 at my fritzbox and it worked!
Is this issue related to that both machines have the same public ip?
Next I tested to have my laptop in other network (hotspot with mobile phone)
ssh [email protected]...... --> Error no route to host
Finally I want to achieve above with domain name....
I then allowed port 22 at my fritzbox and it worked!
I also stopped now my ddclient: sudo service ddclient stop
and I still can access using
ssh [email protected]
Do I need ddclient at all?