5

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?

2
  • 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). Commented Nov 8, 2010 at 21:58
  • Thanks that led me to the answer :-) forgot about -vvv :-)
    – echox
    Commented Nov 9, 2010 at 9:32

4 Answers 4

4

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.

1

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"

to

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.

0

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
3
  • Nope, its a linux host and I also don't have any Xorg or something with a GUI.
    – echox
    Commented Nov 8, 2010 at 14:57
  • putty is in the standard repos for most dists, but the problem with X is worse...
    – Johan
    Commented Nov 8, 2010 at 16:57
  • What echox is trying to do is exactly what corkscrew is for. Commented Nov 8, 2010 at 21:59
0

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.

1
  • 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. Commented Dec 3, 2010 at 20:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .