1 '\" te
   2 .\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH SSH-SOCKS5-PROXY-CONNECT 1 "Oct 30, 2002"
   7 .SH NAME
   8 ssh-socks5-proxy-connect \- Secure Shell proxy for SOCKS5
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fB/usr/lib/ssh/ssh-socks5-proxy-connect\fR
  13      [\fB-h\fR \fIsocks5_proxy_host\fR]
  14      [\fB-p\fR \fIsocks5_proxy_port\fR] \fIconnect_host\fR \fIconnect_port\fR
  15 .fi
  16 
  17 .SH DESCRIPTION
  18 .LP
  19 A proxy command for \fBssh\fR(1) that uses SOCKS5 (RFC 1928). Typical use is
  20 where connections external to a network are only allowed via a socks gateway
  21 server.
  22 .sp
  23 .LP
  24 This proxy command does not provide any of the SOCKS5 authentication mechanisms
  25 defined in RFC 1928. Only anonymous connections are possible.
  26 .SH OPTIONS
  27 .LP
  28 The following options are supported:
  29 .sp
  30 .ne 2
  31 .na
  32 \fB\fB-h\fR \fIsocks5_proxy_host\fR\fR
  33 .ad
  34 .RS 24n
  35 Specifies the proxy web server through which to connect. Overrides the
  36 \fBSOCKS5_SERVER\fR environment variable.
  37 .RE
  38 
  39 .sp
  40 .ne 2
  41 .na
  42 \fB\fB-p\fR \fIsocks5_proxy_port\fR\fR
  43 .ad
  44 .RS 24n
  45 Specifies the port on which the proxy web server runs. If not specified, port
  46 80 is assumed. Overrides the \fBSOCKS5_PORT\fR environment variable.
  47 .RE
  48 
  49 .SH OPERANDS
  50 .LP
  51 The following operands are supported:
  52 .sp
  53 .ne 2
  54 .na
  55 \fB\fIsocks5_proxy_host\fR\fR
  56 .ad
  57 .RS 21n
  58 The host name or IP address (IPv4 or IPv6) of the proxy.
  59 .RE
  60 
  61 .sp
  62 .ne 2
  63 .na
  64 \fB\fIsocks5_proxy_port\fR\fR
  65 .ad
  66 .RS 21n
  67 The numeric port number to connect to on \fIsocks5_proxy_host\fR.
  68 .RE
  69 
  70 .sp
  71 .ne 2
  72 .na
  73 \fB\fIconnect_host\fR\fR
  74 .ad
  75 .RS 21n
  76 The name of the remote host to which the socks gateway is to connect you.
  77 .RE
  78 
  79 .sp
  80 .ne 2
  81 .na
  82 \fB\fIconnect_port\fR\fR
  83 .ad
  84 .RS 21n
  85 The numeric port number of the socks gateway to connect you to on
  86 \fIconnect_host\fR.
  87 .RE
  88 
  89 .SH EXAMPLES
  90 .LP
  91 The recommended way to use a proxy connection command is to configure the
  92 \fBProxyCommand\fR in \fBssh_config\fR(4) (see Example 1 and Example 2).
  93 Example 3 shows how the proxy command can be specified on the command line when
  94 running \fBssh\fR(1).
  95 .LP
  96 \fBExample 1 \fRSetting the proxy from the environment
  97 .sp
  98 .LP
  99 The following example uses \fBssh-socks5-proxy-connect\fR in
 100 \fBssh_config\fR(4) when the proxy is set from the environment:
 101 
 102 .sp
 103 .in +2
 104 .nf
 105 \fBHost playtime.foo.com
 106     ProxyCommand /usr/lib/ssh/ssh-socks5-proxy-connect \e
 107         playtime.foo.com 22\fR
 108 .fi
 109 .in -2
 110 .sp
 111 
 112 .LP
 113 \fBExample 2 \fROverriding proxy environment variables
 114 .sp
 115 .LP
 116 The following example uses \fBssh-socks5-proxy-connect\fR in
 117 \fBssh_config\fR(4) to override (or if not set) proxy environment variables:
 118 
 119 .sp
 120 .in +2
 121 .nf
 122 \fBHost playtime.foo.com
 123     ProxyCommand /usr/lib/ssh/ssh-socks5-proxy-connect -h socks-gw \e
 124         -p 1080 playtime.foo.com 22\fR
 125 .fi
 126 .in -2
 127 .sp
 128 
 129 .LP
 130 \fBExample 3 \fRUsing the command line
 131 .sp
 132 .LP
 133 The following example uses \fBssh-socks5-proxy-connect\fR from the \fBssh\fR(1)
 134 command line:
 135 
 136 .sp
 137 .in +2
 138 .nf
 139 example$ \fBssh -o'ProxyCommand=/usr/lib/ssh/ssh-socks5-proxy-connect \e
 140     -h socks-gw -p 1080 playtime.foo.com 22' playtime.foo.com\fR
 141 .fi
 142 .in -2
 143 .sp
 144 
 145 .SH ENVIRONMENT VARIABLES
 146 .ne 2
 147 .na
 148 \fB\fBSOCKS5_SERVER\fR\fR
 149 .ad
 150 .RS 17n
 151 Takes \fIsocks5_proxy_host\fR operand to specify the default proxy host.
 152 .RE
 153 
 154 .sp
 155 .ne 2
 156 .na
 157 \fB\fBSOCKS5_PORT\fR\fR
 158 .ad
 159 .RS 17n
 160 Takes \fIsocks5_proxy_port \fR operand to specify the default proxy port.
 161 .RE
 162 
 163 .SH EXIT STATUS
 164 .LP
 165 The following exit values are returned:
 166 .sp
 167 .ne 2
 168 .na
 169 \fB\fB0\fR \fR
 170 .ad
 171 .RS 6n
 172 Successful completion.
 173 .RE
 174 
 175 .sp
 176 .ne 2
 177 .na
 178 \fB\fB1\fR \fR
 179 .ad
 180 .RS 6n
 181 An error occurred.
 182 .RE
 183 
 184 .SH ATTRIBUTES
 185 .LP
 186 See \fBattributes\fR(5) for descriptions of the following attributes:
 187 .sp
 188 
 189 .sp
 190 .TS
 191 box;
 192 c | c
 193 l | l .
 194 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 195 _
 196 Interface Stability     Stable
 197 .TE
 198 
 199 .SH SEE ALSO
 200 .LP
 201 \fBssh\fR(1), \fBssh-http-proxy-connect\fR(1), \fBssh_config\fR(4),
 202 \fBattributes\fR(5)