Why are ssh and git push not working? So recently, I have noticed that commands like ssh, git push, and git pull sometimes stop working. They only start working after I restart my computer. The interesting thing is that I can still browse the web, use other apps that require internet access perfectly fine.

I cannot SSH or make a VNC connection to a computer at my home, or pull/push on repos. Anybody have any idea what seems to be the issue? I am on macOS Siera 10.12.5 on an Apple MacBook Pro 2015.
I used to have a similar issue back in Yosemite. Here is how I fixed it:

System Preferences -> Security or Security &amp; Privacy. -> Firewall Tab -> Click the Lock and enter your password -> Toggle Firewall on and off -> Restart your computer