Score:0

Cannot connect to Ubuntu 20.04 server through ssh locally, only through the outside

mx flag

I created a ubuntu server today, and everything was working nicely, even managed to change the port. Couple hours later, I cannot use "ssh -p 2606 [email protected]", only "ssh -p 2606 [email protected]" (fictional adress).

When running "ssh -p 2606 [email protected]" I get the error message "ssh: connect to host 192.168.1.4 port 2606: No route to host", when running "ssh -p 2606 [email protected]" everything works corectly and I am prompted to enter my password.

I have tried everything, flushing iptables, disabling ufw, uninstalling ufw, changing ports back to 22, nothing work, still not able to connect locally.

user535733 avatar
cn flag
That usually happens when the ssh client is on a different network from the ssh server. (It's on the wrong side of the router). If on the same LAN, then the non-routable 192.168.1.4 address would work.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.