rheaCRT

Manual

Proxies

A session can reach its host through a proxy: a machine that makes the connection on rheaCRT's behalf. rheaCRT connects to the proxy, asks it for a connection to the host, and from then on the session runs through it as if it were direct. The host's key is checked against the host exactly as for a direct connection, whatever carried it.

In File → New Session…, choose SSH and open SSH proxy. For a saved SSH session, right-click it in the Session Manager and choose Properties…. Pick a proxy type and enter its host. A port of zero uses 1080 for SOCKS and 8080 for HTTP CONNECT. Leave fields inherited to use the folder or all-session settings. Choose Direct to bypass an inherited proxy for this session.

Use Options → SSH Proxy Defaults… for all saved sessions. For a folder, right-click the folder and choose SSH Proxy Defaults…. Settings on an individual session take precedence. Use no proxy user selects anonymous access when the parent supplies a user name.

Set Proxy user if the gateway requires a login. For SOCKS5 or HTTP, rheaCRT asks for the password in the terminal each time you connect. Only the user name goes in the profile. The SSH host key and SSH sign-in that follow belong to the destination. Connection details shows the destination and the proxy socket address separately.

The kinds

KindWho looks up the host's nameSign-in to the proxyUsual port
SOCKS5The proxyNone, or a user name and password1080
SOCKS4aThe proxyA user id; no password1080
SOCKS4Nobody: it takes an IPv4 address onlyA user id; no password1080
HTTP (the CONNECT method)The proxyNone, or a user name and password (Basic)None is standard; 3128 and 8080 are common

The proxy looks up the name, never this computer. A name that only means something inside the network the proxy sits in still works, because it is sent to the proxy as it is. That is usually the point of the proxy. SOCKS4 has no way to carry a name, so with SOCKS4 a name is refused with a sentence that says which kinds take one.

A proxy password is not protected on the way to the proxy. SOCKS5 and HTTP Basic both send it as it is. Use them on a network you trust. rheaCRT never shows the password: not in a message, and not in its own records.

Time limits

Two waits, each with the session's connect timeout (15 seconds unless changed): reaching the proxy, and the proxy opening the connection to the host. The SSH handshake that follows has the same limit again, as for a direct connection.

What a session says when the proxy is the trouble

Every one of these names the proxy, so a fault at the proxy is never taken for a fault at the host.

What happenedWhat you see
Nothing is listening where the proxy should becould not connect to the proxy at PROXY: REASON
The proxy's machine does not answerno answer from the proxy at PROXY within 15 seconds
The proxy takes the connection and then says nothingthe proxy at PROXY did not open a connection to HOST:PORT within 15 seconds
The proxy says nothe proxy at PROXY refused the connection to HOST:PORT: REASON
The proxy wants a sign-in and none is setthe proxy at PROXY asked for a user name and password, and none is set for it
The proxy rejects the sign-inthe proxy at PROXY did not accept the user name and password set for it
It is not that kind of proxythe proxy at PROXY did not answer as a SOCKS5 proxy
It hangs up without a wordthe proxy at PROXY closed the connection without a reply: it may not be a SOCKS4 proxy, or it could not open a connection to HOST:PORT
It answers at first, then hangs up when asked for the hostthe proxy at PROXY closed the connection instead of opening one to HOST:PORT: it could not reach it, or does not allow it
SOCKS4 is given a namethe proxy at PROXY is set to SOCKS4, which takes an IPv4 address and not a host name: choose SOCKS4a or SOCKS5 for it, or give the address of HOST

The reasons a SOCKS5 proxy can give, in rheaCRT's words: it reported a general failure; its rules do not allow it; the network is unreachable; the host is unreachable; the host refused it; the time to live ran out on the way to the host; it does not support the CONNECT command. An HTTP proxy's refusal carries its status, for example its rules do not allow it (HTTP status 403 Forbidden).

Two of the rows above come from a real proxy. The SOCKS proxy built into OpenSSH has no way to say no: when it cannot reach the host, or the far machine does not allow forwarding, it hangs up. Hence the two sentences that say what a hang-up can mean.

Measured

Through OpenSSH's own SOCKS proxy, with the far end of the proxy on a machine across the internet and the host named as that machine names itself (so only the proxy could look the name up):

KindA shell afterThen, through the proxy
SOCKS5, by name0.4 s300,000 numbered lines in order; a 512 KiB paste, checksum exact
SOCKS4a, by name0.4 sThe same
SOCKS4, by address0.8 sThe same

A proxy that took the connection and said nothing was given up after exactly the limit set (4.00 s with a limit of 4). Each other failure in the table above was reported in under 20 ms.

Typed commands took about 80 ms through that proxy against 14 ms direct. That is the proxy's own handling of small packets, not the distance: rheaCRT's side adds nothing measurable.

Not there yet

Where it lives in the code