Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 get ssh working with an http proxy via corkscrew.

Here is the error:

[echox@archbox:~] % ssh somehost.tld
zsh: No such file or directory
ssh_exchange_identification: Connection closed by remote host

Here is the content of ~/.ssh/config

Host *
ProxyCommand /usr/bin/corkscrew http-proxy.some.proxy.tld 8080 %h %p

I would bet the ProxyCommand is not found, but /usr/bin/corkscrew is working, its also in my PATH. corkscrew without path is also not working.

[echox@archbox:~] % corkscrew http-proxy.some.proxy.tld 8080 some.ssh.host.tld 22 works fine invoked directly.

Any idea?

share|improve this question
Can you log into somehost.tld directly (from somewhere else where you don't need to pierce a firewall)? Post the full trace of ssh -vvv somehost.tld (anonymizing host names consistently and legibly). – Gilles Nov 8 '10 at 21:58
Thanks that led me to the answer :-) forgot about -vvv :-) – echox Nov 9 '10 at 9:32
up vote 4 down vote accepted

Ok, I totally forgot about -vvv :-) Here is the output:

OpenSSH_5.6p1, OpenSSL 1.0.0a 1 Jun 2010
debug1: Reading configuration data /home/echox/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Executing proxy command: exec /usr/bin/corkscrew http-proxy.proxy.tld 8080 somehost.tld 22
debug1: permanently_drop_suid: 1000
zsh: No such file or directory
ssh_exchange_identification: Connection closed by remote host

The key is the line with ssh_connect: needpriv 0. I forgot to add my user to the network group in /etc/group. The connection worked with root and after adding the user to network it works also for him now.

Connections without corkscrew did work before. Does anybody have an idea where this "security" setting is stored? I can't find anything in the arch linux wiki, /etc/, man ssh and the corkscrew source / corkscrew documentation which checks for the network group.

share|improve this answer

Had the same problem ("/bin/bash: /home/thor/bin/connect -4 -S localhost:9050 void 22: No such file or directory")

fixed by changing ~/.ssh/config from

ProxyCommand "~/bin/connect -4 -S localhost:9050 %h %p"


ProxyCommand ~/bin/connect -4 -S localhost:9050 %h %p

(removing the '"')

as to why this fixed it... I don't know.

Ooops, just noticed the OP doesn't even have quotation marks in config-file... as this is still related, I'll leave the answer here for you guys to up-/downvote.

share|improve this answer

I have no idea about corkscrew, but I have had success with ssh though http proxy using putty.

Maybe it can do the work instead?

Edit putty is a X based program so it can't help in all cases.

But if you would like to install putty on something like ubuntu you can just apt it.

sudo aptitude install putty
share|improve this answer
Nope, its a linux host and I also don't have any Xorg or something with a GUI. – echox Nov 8 '10 at 14:57
putty is in the standard repos for most dists, but the problem with X is worse... – Johan Nov 8 '10 at 16:57
What echox is trying to do is exactly what corkscrew is for. – Gilles Nov 8 '10 at 21:59

Might be a stupid thing to check but corkscrew depends on 'netcat' being in your path. Most systems of course have netcat installed by default but a few of them don't have the main binary 'nc' linked to 'netcat' as well. corkscrew depends on being able to call 'netcat', not 'nc'. At least I had the same symptoms you're describing and simply symlinking of nc to netcat fixed it.

share|improve this answer
Corkscrew does not use netcat in any way. A machine on which I use it regularly doesn't have a netcat binary. You can check that the only mention of netcat in the source is in the documentation. You must have explicitly called netcat somewhere. – Gilles Dec 3 '10 at 20:58

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.