Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a issue where, under cygwin, the http_proxy env variable is being ignored. i've tried upper case and lower case for the variable name, it's just not being read by ssh.

export HTTP_PROXY=""

Doesn't use proxy


Uses proxy


Does anyone see what i'm doign wrong?

share|improve this question

Your question is not clear because you don't explain what you're trying to achieve. I'm going to venture a guess, which could of course be wrong. My guess is that:

  • you want to use ssh to connect from your work machine to;
  • ssh doesn't work (hangs, or displays an error message) because your work firewall is blocking outgoing connections;
  • is the proxy you've configured in your web browser at work.

Since ssh uses the ssh protocol, and not the http or https protocol, it doesn't care about the http_proxy or https_proxy variable.

There is a way to tunnel ssh traffic through an https proxy. The proxy can't distinguish ssh traffic from https traffic since they're both encrypted. Three programs that can do this are netcat (the OpenBSD version), corkscrew and connect-proxy. I'm going to give an example for corkscrew which I know is provided in Cygwin. Use the following settings in your .ssh/config file:

Host home
User myuser
ProxyCommand /usr/bin/corkscrew 8080 %h %p /path/to/corkscrew/authfile

and put a single line containing user:pass in /path/to/corkscrew/authfile.

Some proxies won't allow you to connect to port 22 (the normal ssh port), only to port 443 (the normal https port). If you have control over the server at, you can get it to listen on port 443 as well: most likely you'll either want to add 443 to the Port line in the sshd_config file, or to redirect incoming connections on port 443 on your home router to port 22 on your sshd machine. Then add Port 443 below the HostName line in .ssh/config.

Alternatively, if your firewall-piercing efforts fail, look into installing Ajaxterm on a web server outside the firewall.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.