CyberKeeda In Social Media

How to SSH in git behind proxy on windows



SSH into GIT behind proxy.

Steps.

  • Open Git Bash on the repository folder.
  • Create a new ssh config file to store values  ~/.ssh/config

cybeerkeeda@Linux-Maniac:~ vim ~/.ssh/config
  • Copy paste the below lines within the file.

ProxyCommand connect.exe -H yourproxyip:proxyport %h %p 

     Host github.com 
     user git 
     port 22 
     Hostname github.com 
     IdentityFile "c:\users\cyberkeeda\.ssh\id_rsa" 
     TCPKeepAlive yes 
     IdentitiesOnly yes

  • Edit few lines out of it.
  1.           ProxyCommand connect.exe -H yourproxyip:proxyport %h %p 
  2.           IdentityFile "c:\users\cyberkeeda\.ssh\id_rsa" 
      Use your proxy ip/url and port 
      Use your Identity file.

Once configuration saved check again.
cybeerkeeda@Linux-Maniac:~ service sshd restart
If required, do export http_proxies into command lines too.

export http_proxy=http://yourproxyip:port/
export https_proxy=http://yourproxyip:port/

No comments:

Post a Comment

Designed By Jackuna