Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why my SSH hang on there while connecting to github?

Tags:

github

ssh

cygwin

This is what I tried to do ten times today without success:

  • make a key with ssh-keygen.
  • open ~/.ssh/id_rsa.pub with Gedit or Notepad++ and copy the contents.
  • Go to account settings on github.com
  • Go to SSH Keys
  • Click on the Add Key button.
  • give the key a title
  • paste the key into the key box.
  • Save the key (enter my github password to verify).

Then, I run '$ ssh -vT [email protected]' in cygwin, but it always hang on there. Here is the output:

$ ssh -vT [email protected]
OpenSSH_6.0p1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /home/eason.wu/.ssh/config
debug1: /home/eason.wu/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/eason.wu/.ssh/id_rsa type 1
debug1: identity file /home/eason.wu/.ssh/id_rsa-cert type -1

Does any one meet this problem, any solution will be appreciated

like image 945
Eason Avatar asked Jul 30 '12 06:07

Eason


1 Answers

Make sure you did copy the public key as one line, because a copy from an editor can sometime buffer the content of that key as several lines.

If you still have an issue, check other SSH debug tips at "Unable to Git-push master to Github".
A ssh -vvvT [email protected] can display more debug information.


The OP Eason Wu comments:

I found the real reason of this problem, it is caused by my network.
Some websites are prohibited by my company, I would think it also affects GitHub service.
After I turn on an VPN connection, and retest again with ssh -vvvT [email protected], it passed successfully

like image 166
VonC Avatar answered Oct 23 '22 04:10

VonC