0

I am using ubuntu 20.04. ssh was working until I rebooted my computer. Since then I am not able to connect using ssh anymore.

"ssh exemple.com" surprisingly works. but "ssh 8.8.8.8", or "ssh google.com" outputs "Network is unreachable" and telnet google.com 22 gives "Network is unreachable" although I can navigate on my browser.

/etc/ssh/ssh_config contains "Port 22"

I already tried all approaches I could found on the internet. My guess is that ssh request is blocked before reaching the network, but I don't know how to address this problem.

Thanks

Edit : ssh [email protected] -vvv would ask for password, but now shows:

OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/antoine/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 19: Including file /etc/ssh/ssh_config.d/ssh_ant.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/ssh_ant.conf
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 18.198.187.192 is address
debug2: ssh_connect_direct
debug1: Connecting to 18.198.187.192 [18.198.187.192] port 22.
debug1: connect to address 18.198.187.192 port 22: Connection timed out
ssh: connect to host 18.198.187.192 port 22: Connection timed out
11
  • 2
    I don't think Google is running a public facing SSH server on either of those addresses - so "network unreachable" should be expected as you're being dropped by a firewall. You have to test it with a machine you can actually login to. Commented Jun 23, 2021 at 14:38
  • @Panki, utter silence or "connection refused" would make sense, "network unreachable" does not and is not to be expected. Just test it. Commented Jun 23, 2021 at 14:53
  • 1
    @EduardoTrápani I just did with ssh google.com and I got network unreachable. I think it is difficult for a program to distinguish the exact reason why a connection attempt failed Commented Jun 23, 2021 at 15:01
  • 1
    18.198.187.192 looks to be an AWS instance, I have to ask but is this your instance; are you able to verify your instance's IP address hasn't changed? Commented Jun 23, 2021 at 15:17
  • 3
    I’m voting to close this question because in the comments it is stated that the host is actually NOT reachable, and that was a fact about it. Leaving it open will only waste everybody's time. Commented Jun 23, 2021 at 15:36

1 Answer 1

2

@EduardoTrápani Figured out that this was likely a network issue and not an ssh issue as "ping" can not access requested ip addresses either

2
  • 1
    @roaima an answer according to EduardoTrápani 's suggestion Commented Jun 23, 2021 at 15:39
  • Same for me, I was in a guest network and apparently some ports where blocked Commented Nov 13, 2021 at 13:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.