Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 3, 2007, 2:10 pm
rate this thread
Linux so I am going to refer to what I do on AIX...
I have a set of servers that I have to use a ssh proxy to access. In AIX I
was able to add a /etc/socks5c.conf file with the socks entries like this:
Destination / Netmask Socks5_proxy_server_port (1080)
I then added SOCKS5C_CONFIG=/etc/socks5c.conf to /etc/environment and ALL
users on this machine can now access the "Destination" server from above by
ssh Destination (with no flags or anything).
I need to be able to do this on Linux also. I can NOT use -D/-P or whatever
flags on the ssh for this server because I need to do this in a script that
does ssh to various machines and none of the others use any weird -D/-P or
Is this possible? To restate...I want to ssh to these socks proxy servers as
if they were on the local network by just doing:
Re: ssh through socks server
There's no Linux equivalent to the system-wide SOCKSification on AIX
(at least, not in any of the distros I've seen).
You could potentially do something like it by using one of the
LD_PRELOAD-able SOCKS libraries (eg the one used by "runsocks" from the
old NEC SOCKS package or "socksify" from Dante) and setting LD_PRELOAD
in the system startup scripts.
With OpenSSH, the most common way to do this is to use a ProxyCommand
that supports SOCKS, eg connect or netcat. You put something like
this into your ~/.ssh/config or system-wide ssh_config:
ProxyCommand connect -S socks.example.com:1080 %h %p
and then "ssh somehost" should just work. You can also use "Host *" at
the bottom of the config to use your SOCKS server by default.
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum