Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SSH stopped working (ubuntu 18.04)

I used to have SSH working for all my repositories on my desktop PC.

Something seems to have updated in Ubuntu a few months ago and now SSH no longer works. I didn't report it here right away, but now it has become increasingly annoying.

On my laptop, I can still use SSH to access all my repositories the same as always.

But on my desktop PC, SSH has stopped working.

For example, when I try to do a git push, it hangs for several minutes then eventually comes back with this error:

Pushing to git@bitbucket.org:XXXX/XXXXX.git
ssh: connect to host bitbucket.org port 22: Network is unreachable
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

When the problem first occurred, I tried the SSH troubleshooting FAQ, restarting SSH  on the PC, and so forth.

 

I am not an SSH expert.  I just don't know what to try to diagnose the situation or get more information to lead to a solution.

 

1 answer

1 vote

"Network is unreachable" simply means that your client machine cannot get to the target over your network.

This is almost always caused by a local network problem - your machine is simply not on the internet.

Try

ssh -vvv <target>

This gives you a suprising (and yet boring) information about the connection!

I don't think that's the problem.

As I mentioned, I am always able to access bitbucket using https.

It's only SSH that does not work.

As requested, I ran that command:

*****

ssh -vvv bitbucket.org
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "bitbucket.org" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to bitbucket.org [18.205.93.0] port 22.
debug1: connect to address 18.205.93.0 port 22: Connection timed out
debug1: Connecting to bitbucket.org [18.205.93.1] port 22.
debug1: connect to address 18.205.93.1 port 22: Connection timed out
debug1: Connecting to bitbucket.org [18.205.93.2] port 22.
debug1: connect to address 18.205.93.2 port 22: Connection timed out
debug1: Connecting to bitbucket.org [2406:da00:ff00::22e9:9f55] port 22.
debug1: connect to address 2406:da00:ff00::22e9:9f55 port 22: Network is unreachable
debug1: Connecting to bitbucket.org [2406:da00:ff00::6b17:d1f5] port 22.
debug1: connect to address 2406:da00:ff00::6b17:d1f5 port 22: Network is unreachable
debug1: Connecting to bitbucket.org [2406:da00:ff00::22c2:513] port 22.
debug1: connect to address 2406:da00:ff00::22c2:513 port 22: Network is unreachable
debug1: Connecting to bitbucket.org [2406:da00:ff00::22cd:e0db] port 22.
debug1: connect to address 2406:da00:ff00::22cd:e0db port 22: Network is unreachable
debug1: Connecting to bitbucket.org [2406:da00:ff00::22c3:9b0a] port 22.
debug1: connect to address 2406:da00:ff00::22c3:9b0a port 22: Network is unreachable
debug1: Connecting to bitbucket.org [2406:da00:ff00::3403:4be7] port 22.
debug1: connect to address 2406:da00:ff00::3403:4be7 port 22: Network is unreachable
debug1: Connecting to bitbucket.org [2406:da00:ff00::34cc:ea4a] port 22.
debug1: connect to address 2406:da00:ff00::34cc:ea4a port 22: Network is unreachable
debug1: Connecting to bitbucket.org [2406:da00:ff00::22c0:3470] port 22.
debug1: connect to address 2406:da00:ff00::22c0:3470 port 22: Network is unreachable
ssh: connect to host bitbucket.org port 22: Network is unreachable

 

ping google.com
PING google.com (172.217.24.174) 56(84) bytes of data.
64 bytes from kul08s01-in-f14.1e100.net (172.217.24.174): icmp_seq=1 ttl=53 time=20.9 ms
64 bytes from kul08s01-in-f14.1e100.net (172.217.24.174): icmp_seq=2 ttl=53 time=20.9 ms
64 bytes from kul08s01-in-f14.1e100.net (172.217.24.174): icmp_seq=3 ttl=53 time=20.9 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 20.900/20.926/20.976/0.123 ms

*******************

The connecting -> timeout cycles each took about a minute.

At the end, I ping'ed google.com just to show that I am on the network.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,897 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you