Tested on Linux Mandrake 8.1, this will not affect you providing you have RPM support.
There are 4 solutions covered in this SSH through a SOCKS guide.
Currently I use Goto-san's connect.c and the wrapper "runsocks" for other applications, read this whole FAQ before making your decision!
http://rpmfind.net/linux/rpm2html/search.php?query=socks
I installed runsocks-1.0r11-3.i386.rpm successfully.
I have also rpm --rebuild the src.rpm to make the whole packages and
installed those as well.
i rebuilt the source downloaded from
ftp://rpmfind.net/linux/falsehope/home/gomez/socks5/
Do this in your shell
$Â export SOCKS4_SERVER = my_server
Create this file /etc/libsocks5.conf
$ cat /etc/libsocks5.conf
socks4 - - - - mysocks4server
There are problems with this
You have to be root to use runsocks ssh -l me <host> or I get the
following error:
$ runsocks ssh -l myuser myhost.com
ssh: error while loading shared libraries: libsocks5_sh.so: cannot
open
shared object file: No such file or directory
DNS does not work, I get this error from ssh
$ su
# runsocks ssh -l myuser myhost.com
ssh: myhost.com: Temporary failure in name resolution
The only way to connect is to be root and also use the IP.
I can connect, its just a pain to have to be root and use the IP
address.
Read the man pages for libsocks5.conf and runsocks for further information.
I found how to use OpenSSH through socks.
a) Download and compile this URL's source code. And put the binary in your path.
http://www.imasy.or.jp/~gotoh/connect.c
% gcc -o connect connect.c
# cp connect /usr/local/bin
b)Â Add the following line in your ssh_config.
ProxyCommand /usr/local/bin/connect -4 -S condor:1080 %h %p
That's it! Everything shoudl work now
This is the best solution IMO.
export SSH_SOCKS_SERVER=socks://juser@socks-server:1080/x.x.x.0/24
Also need to add a "SocksServer" option to one of the config files I
think, but I gave up on proprietary solutions so I do not know which.
Other Links
http://www.funet.fi/pub/unix/security/firewalls/socks/socks4/