Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6768899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:07:44+00:00 2026-05-26T15:07:44+00:00

I followed the git guide but I have this strange issue when trying to

  • 0

I followed the git guide but I have this strange issue when trying to connect to github:

$ ssh -v git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Documents and Settings/mugues/.ssh/config
debug1: Applying options for github.com
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: connect to address 207.97.227.239 port 22: Attempt to connect timed out without establishing a connection
ssh: connect to host github.com port 22: Bad file number

This is my config file under .ssh

Host github.com
    User git
    Hostname github.com
    PreferredAuthentications publickey
    IdentityFile "C:\Documents and Settings\mugues\.ssh\id_rsa"
    TCPKeepAlive yes
    IdentitiesOnly yes

Any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:07:45+00:00Added an answer on May 26, 2026 at 3:07 pm

    After having this problem myself, I found a solution that works for me:

    Error message:

        ssh -v git@github.com
        OpenSSH_5.8p1, OpenSSL 1.0.0d 8 Feb 2011
        debug1: Connecting to github.com [207.97.227.239] port 22.
        debug1: connect to address 207.97.227.239 port 22: Connection timed out
        ssh: connect to host github.com port 22: Connection timed out
        ssh: connect to host github.com port 22: Bad file number
    

    You will only see the bad file number message when on windows using the MINGGW shell. Linux users will just get Timed out.

    Problem:

    SSH is probably blocked on port 22. You can see this by typing

        $nmap -sS github.com -p 22
        Starting Nmap 5.35DC1 ( http://nmap.org ) at 2011-11-05 10:53 CET
        Nmap scan report for github.com (207.97.227.239)
        Host is up (0.10s latency).
        PORT   STATE    SERVICE
        22/tcp ***filtered*** ssh
    
        Nmap done: 1 IP address (1 host up) scanned in 2.63 seconds
    

    As you can see the state is Filtered, which means something is blocking it.
    You can solve this by performing an SSH to port 443 (your firewall / isp will not block this).
    It is also important that you need to ssh to “ssh.github.com” instead of github.com.
    Otherwise, you will report to the webserver instead of the ssh server.
    Below are all the steps needed to solve this problem.

    Solution:

    (First of all make sure you generated your keys like explained on http://help.github.com/win-set-up-git/)

    create file ~/.ssh/config (ssh config file located in your user directory.
    On windows probably %USERPROFILE%\.ssh\config

    Paste the following code in it:

        Host github.com
        User git
        Hostname ssh.github.com
        PreferredAuthentications publickey
        IdentityFile ~/.ssh/id_rsa
        Port 443
    

    Save the file.

    Perform ssh like usual:

    $ssh -T github.com 
        $Enter passphrase for key '.......... (you can smile now :))
    

    Note that I do not have to supply the username or port number.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed the guide here http://www.hackido.com/2010/01/installing-git-on-server-ubuntu-or.html but I cannot find the proper way to
I followed every step given in this guide: http://help.github.com/linux-key-setup/ When I get to the
I have followed this tutorial to configure apn_on_rails but I am getting the following
I installed the Mocha 0.9.7 Rails plug-in using: $ script/plugin install git://github.com/floehopper/mocha.git (Just followed
New to Git. Followed all the directions from github help pages but simple commands
I have followed the following instructions in setting a git repository locally in one
I just started using git with github. I followed their instructions and ran into
Followed this question about delayed_job and monit Its working on my development machine. But
I followed this guide: http://wiki.unto.net/setting-up-clojure-and-slime Which walked me through the steps of building Clojure
I want to use redis with sinatra,and followed the guide like this require redis

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.