Permission denied . fatal: The remote end hung up unexpectedly

You must have encountered this error, while connecting to github after you have generated the ssh keys.
Some key points to check for this error.
  1. Check the content of the file in your system, that should match with the ssh keys in your github account. Copy the content of the file and paste it your github account settings page.
  2. If still not working, check whether the port 22 is opened/blocked from your system, as that was the issue in my case, it was blocked.
  3. Check status of port in Windows
  4. Open the port 22, if its blocked.  Use the command : netsh firewall add portopening TCP 22 SSH enable subnet. Refer here for details about configuring Windows firewall.
  5. If still not working,  generate new ssh keys.
  6. Try cloning from git, it should work :)


Popular Posts