ssh + http proxy (corkscrew) not working
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?
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
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.
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.
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.