Port forwarding
Click the port forwarding icon in the title bar and the left sidebar switches to the list of forwards. Each forwarding rule goes through a saved host and opens an SSH connection of its own when it starts, independent of that host’s terminal or SFTP tabs: closing the tabs or choosing “Disconnect” on the host doesn’t affect it, and the host’s connection state doesn’t count it. The list of forwards shows which are running.
Forwarding types
Section titled “Forwarding types”There are three kinds of forward. Think of each as “entrance → exit → destination”: a connection comes in at the entrance, goes through the SSH tunnel to the exit, and the exit connects to the destination:
| Type | Entrance (listens) | Exit | Use |
|---|---|---|---|
Local (ssh -L) |
This computer | Server | Reach a service on the server’s side from this computer, such as connecting a local client to a database that only the server can reach |
Remote (ssh -R) |
Server | This computer | Let the server’s side reach a service on this computer, such as showing someone a site you’re developing locally, or receiving webhooks |
Dynamic (ssh -D) |
This computer (SOCKS proxy) | Server | Use the server as a proxy, with the destination chosen by the app, such as browsing the web through the server |
Creating a forward
Section titled “Creating a forward”- Creating and editing: “+” at the top of the list opens the dialog. A row of three cards at the top chooses the type; the diagram in the middle fills in the addresses as you type and marks which machine the entrance is on; and a sentence below explains what the rule does (such as “Connecting to 127.0.0.1:8080 on this computer is the same as connecting to db.internal:3306 from the SSH server.”). The “SSH server” in the diagram and the sentence is the host chosen in “Via host”; the diagram calls it by its role, not by the host’s name. A dot moves slowly along the diagram in the direction of the connection: through the SSH tunnel first, then on to the destination, pausing and starting over; switching type sends it off again from the new entrance. The name is optional; without one, the list shows a summary of the forward (
8080 → db.internal:3306,9000 ← localhost:3000,SOCKS 1080).
Running a forward
Section titled “Running a forward”- Starting and stopping: the button at the end of each row, double-click the row, or select it and press Enter; the context menu also has “Edit port forward…” and “Delete”. “Create” only saves the rule and doesn’t start it. Rules with “Start when ShellRS opens” checked start along with the app.
- Status: the end of the row shows “Connecting”, “Running” (with the current number of connections), “Connection lost, reconnecting”, or “Stopped:” with the reason. When a single connection can’t be forwarded (for example, the server can’t reach the destination), only that row says so, and the forward keeps running.
- Login: uses the host’s settings, the password saved in the keychain and ShellRS’s own known hosts file. A host you’re connecting to for the first time, or a password that has to be entered, brings up the same prompt as in a terminal, saying which forward is connecting; cancelling the prompt stops the forward.
- Reconnecting after a drop: when the connection drops, ShellRS reconnects automatically up to three times, after 1, 3 and 10 seconds. While it reconnects, the local listening port stays open, and new incoming connections are closed straight away. Automatic reconnects never prompt: if a password needs entering again or a host key needs confirming, the forward stops with the reason, and you can start it by hand. It also stops after three failed attempts, with a notification.
Editing and deleting
Section titled “Editing and deleting”- After changes: editing a running rule’s type, host, listening address or destination restarts the forward with the new settings; changing only the name or auto start doesn’t. Editing the host it goes through (its address, authentication, credential, jump hosts and so on) leaves a running forward alone: the new settings apply the next time it starts.
- Deleting a host: deleting a host (or a group that contains it) also deletes the forwarding rules that go through it, stopping running ones first; the confirmation says how many.
SOCKS and listening addresses
Section titled “SOCKS and listening addresses”- Dynamic forwarding supports SOCKS5 (no authentication,
CONNECT, IPv4, domain names, IPv6) and SOCKS4 / 4a. Domain names are resolved by the server. - The listening address defaults to
127.0.0.1. With another address, local and dynamic forwards can be used by other devices on the same network; for a remote forward, other machines can connect only if the server’ssshd_configsetsGatewayPorts clientspecifiedoryes. The default isno, in which case the forward still runs without an error but listens only on the server’s own127.0.0.1(the same as a hand-writtenssh -R). The dialog points this out when you enter a non-loopback address. Ports below 1024 need administrator rights (root, on the server). Port 0 (letting the system pick a port) isn’t supported.
Not implemented yet: managing forwards through the external CLI, and ordering rules. The system’s “Reduce motion” setting doesn’t turn off the diagram’s animation yet.