Reconnect & ended sessions
What happens when a session drops, and how to reconnect in place with R.
Reconnect & ended sessions
When an SSH connection drops (the server reboots, the network changes, the laptop sleeps, a keepalive times out), the session ends cleanly instead of freezing, and you can bring it back in place with one key.
How you can tell a session has ended
- The tab's dot turns red. An SFTP tab's folder icon turns red too.
- The terminal prints Session ended and stops accepting input, so nothing you type disappears into a dead connection.
- When the server didn't send an exit status (a dropped network, for example), the session reports exit code 255, as OpenSSH does.
Reconnect
Do any of these:
- press R in the ended terminal;
- click the floating Reconnect button at the bottom of the terminal;
- right-click the tab → Reconnect;
- click Reconnect in the connection-error overlay.
The session reconnects in the same tab. The old output stays above a divider, so you don't lose what was on screen. For a local shell the button and menu item say Restart shell instead.
Only a bare R reconnects. ⌘R and Ctrl+R keep their usual meaning.
When the connection fails
If the connection can't be made at all, an overlay shows the step that failed (Connection, Authentication, Shell or Session) and the reason. Show logs expands the detailed log, Reconnect tries again, and Close gives up.
Tips
- A recording continues across a reconnect, so a session that drops and comes back is still one recording. See Session recording.
- To open a second connection rather than reviving this one, use Duplicate (new SSH session) on the tab menu. See Terminal tabs.
- If a host drops often, check its icon in the vault. See Host reachability.