Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

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’m trying to connect to a Linux machine via SSH. The problem is that my Mac is in a different network, behind a proxy that routes HTTP and HTTPS through port 80.

How can I access the Linux machine via SSH from terminal?

Connecting with -vvv returns the following result:

OpenSSH_5.2p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to _example.com_ [_ip_address_] port 22.
debug1: connect to address _ip_address_ port 22: Connection refused
ssh: connect to host _example.com_ port 22: Connection refused
share|improve this question
SSH doesn't use HTTP or HTTPS, so from your description the web proxy is irrelevant. Possibly there is a firewall preventing you from connecting to the standard SSH port (22)? – Gerry Jul 26 '12 at 8:55
@Gerry I am behind a firewall, yes. And I’m interested in a solution to make it work in these conditions. – Alex Jul 26 '12 at 8:59
Hard to say, if the firewall effectively blocks everything except web traffic via the web proxy, there is no way to directly connect via SSH to your host. If the firewall allows traffic outside on different ports, you can configure your SSH server to listen on another port than the default. – Gerry Jul 26 '12 at 9:02
Can you try to connect using the -vvv argument and edit the question with the output? – Warren Pena Feb 9 '13 at 20:51
@WarrenPena, see the edit to my question. – Alex Apr 29 '13 at 13:36

You may need tunneling technique for accessing an HTTP proxy using SSH tunneling check this link:

share|improve this answer
They're trying to connect to SSH, not HTTP. – Warren Pena Feb 9 '13 at 20:52
The question says: How can I access the Linux machine via SSH from terminal? – NKN Feb 13 '13 at 11:46
The server administrator should give them a VPN and provide access to SSH (port 22) through the proxy. – NKN Feb 13 '13 at 11:47

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.