Home > Articles > Operating Systems, Server > Solaris

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend


Proxies allow application-layer connections without allowing direct network connectivity. This allows applications to bridge otherwise inaccessible networks. Proxy support can be implemented in either of two ways: using alternative networking shared libraries (for instance, the runsocks command) or using the internal proxy support (ProxyCommand keyword).

The ProxyCommand interface is an external command executed with /bin/sh. The command should read from standard input and write to standard output. See ssh_config(4) and the OpenSSH source code for more details on the interface. The Solaris Secure Shell software provides support for SOCKS 5 servers through the ssh-socks5-proxy-connect(1) command and HTTP proxy servers through the ssh-http-proxy-connect(1) command. Both commands use the ProxyCommand interface and are located in the /usr/lib/ssh directory.


General-usage protocols, such as HTTP and SSH, can be used to allow almost anything across the proxy, including enscapulated IP traffic. Monitor the proxy for suspicious behavior. The encrypted Secure Shell traffic hides the network content but not the endpoints or the amount of bandwidth consumed.

The following code example shows the proxy access by using the runsocks command. Some sites require SOCKS_SERVER and LD_LIBRARY_PATH to be explicitly set.

$ /usr/bin/env SOCKS_SERVER=sockserver:1080 \
LD_LIBRARY_PATH=/usr/local/socks/lib /usr/local/socks/bin/runsocks \
/opt/OBSDssh/bin/ssh remote.host.com

The following code example shows the proxy access by using the ProxyCommand interface:

$ ssh -o'ProxyCommand=/usr/lib/ssh/ssh-socks5-proxy-connect \
     -h socks-gw -p 1080 dmz.foo.com 22' dmz.foo.com
user@dmz's password: password
Last login: Thu Dec 10 23:03:04 2002 from foo.bar.com
Sun Microsystems Inc.  SunOS 5.8    Generic May 2001

The proxy method to access a remote host can be specified on a per-host basis with the ProxyCommand and Host keywords. The shared library method cannot be used in this manner. Note that the entire command string must be on one line.

Host Teach
  ProxyCommand /usr/lib/ssh/ssh-socks5-proxy-connect -h sockserver -p 1080 teach.foo.com 22
  • + Share This
  • 🔖 Save To Your Account