My ssh key won't work on my personal wifi network. How do I fix it

I have a macbook pro that I'm using for work.

So I set up an ssh key for use with a bitbucket team account. My work email is a gmail account. But my bitbucket account is a team account with same email, of which I don't have the password. When I want to login to bitbucket it uses my work gmail account and password.

When I'm at work and connected to my office wifi, I can push and pull from bitbucket. But when I'm working remote and connected to my personal wifi and I try to use git with remote I always get the error ssh_exchange_identification: read: Connection reset by peer

How can I fix this.


Turned out that my company had restricted access to their bitbucket account. I eventually used our VPN settings and all works fine now.