title: Git, SSH and ProxyCommand
body: <p>I have a git server that is behind a firewall. I can access the firewall from my home, but not the git server. However, I can access the git server from the firewall (that is, I can SSH to the firewall and then SSH from the firewall to the git server). I am looking to push and pull to the git repos from my home machine, and I thought the SSH ProxyCommand would do it. So I added the following to my SSH config file:</p>
  
  <pre><code>Host git_server
   HostName git_server.dom
   User user_git_server
   IdentityFile ~/.ssh/id_rsa
   ProxyCommand ssh firewall exec nc %h %p
  
  Host firewall
   HostName firewall.dom
   User user_firewall
   IdentityFile ~/.ssh/id_rsa
  </code></pre>
  
  <p>With this setup, I can directly SSH to the git server by doing <code>ssh git_server</code>. However, git commands that need to talk to the server do not work. <code>git remote show origin</code> fails with the message:</p>
  
  <pre><code>ssh: connect to host git_server.dom port 22: Operation timed out
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights and the repository exists.
  </code></pre>
  
  <p>The url of the origin repo is </p>
  
  <pre><code>ssh://user_git_server@git_server.dom/path/to/bare/repository/repo.git
  </code></pre>
  
  <p>I think I have most of the things in place, but am missing a small crucial piece. Any pointers to what I could be doing wrong?</p>