Opening and managing SSH sessions
What it is
An SSH session is a live console between your browser and a network device. It can run in two ways:
- This PC — the classic way: the Local Agent installed on your own computer opens the SSH connection. It only reaches the networks your PC can reach.
- Primary agent — since v1.204.115: the SSH connection leaves from the Primary agent of the organization, the Local Agent that runs inside the client’s network. You can open consoles from anywhere, with no VPN. The console itself is drawn in your browser and the server relays what you type and what the device answers.
Both kinds of console have the same toolbar and the same tools (since v1.204.124): scripts, Cluster Mode, recording, Files, themes. CreaRack supports multiple simultaneous sessions in tabs and panes, and the sessions persist while you navigate around the app.
Run on: choosing where the console runs
At the top of the sidebar of the Terminal page there is a selector, Run on, with two options:
- Primary agent (hostname) — the default choice (when remote access is off and this PC has an Agent, This PC is preselected instead), available when Remote access via Primary agent is on for the organization. The hostname of the agent is shown next to it while it is online. If the Primary agent is offline or outdated the option stays selectable: a click on a device then shows the Primary agent is offline dialog, which offers This PC.
- This PC — the Local Agent of your computer.
Your choice is remembered per organization in this browser (all its tabs), and it is the same choice the network tools use (Discovery and Auto-Provision). If you picked another Agent there, consoles still open through the Primary agent and the line under the selector says so. When the Primary agent cannot be used, that line tells you why. Administrators also get an Agent Fleet button next to the selector, which opens the Agent Fleet Manager.
When remote access is off
Remote access via Primary agent is off for every organization until an administrator turns it on. While it is off, the Primary agent option is greyed out and the Terminal page shows a notice under the selector: Remote access via Primary agent is off for this organization. It explains that consoles open from this PC and only reach its networks, and that remote network scans are not available. From outside the client’s network a console then fails with a timeout, even if the device was discovered correctly through the Primary agent.
- If you are an administrator, the notice has a button, Turn on remote access. Press it: a toast says Remote access via Primary agent is on and the Primary agent option becomes selectable; unless you had chosen This PC earlier, it is picked and your next click on a device opens through the Primary agent.
- Otherwise the notice says Ask an administrator to turn remote access via Primary agent on.
Turning remote access off is only done in Organization Settings › Remote access via Primary agent, because it closes every open console of the organization. See [[crearack—settings—remote-console]].
How to open a session
Managed devices and detected devices: one click
- Open the Terminal page and check Run on.
- Click a device in the sidebar.
- The session opens. With Primary agent, the server hands the device’s stored credentials to the Primary agent once; with This PC, the Local Agent retrieves them from the server. In both cases the browser never sees a password.
Every tab shows where its console runs: a PRIMARY mark on remote consoles and a This PC mark on local ones, and remote tabs are named with the organization and the device («CCIB · AU-Nodal»), so you can tell consoles of several clients apart. Under a remote console a one-line status strip says what is going on: Live via Primary agent …, Connecting…, Reconnecting… (the Primary agent lost CreaRack for a moment; your session on the device is kept for up to 6 minutes and typing is paused), the idle warning one minute before the console closes, and the reason when it closes.
Only three situations ask you something, always in the same dialog:
- Primary agent is offline — the message says since when, and offers Use this PC.
- No saved credentials — the usual Manual SSH Session dialog, where you can pick a set from the credential store or type the username and password for this console only (they are not stored unless you tick Save). Since v1.204.129 the store list also offers credentials that hold an SSH private key, marked (key): the Primary agent logs in with the key and never receives your passphrase (the key is stored without it). Key login needs a Primary agent 2.38.0 or newer; with an older one the console says so and asks for an update. See [[crearack—settings—credential-store]].
- The device’s identity has changed — the SSH host key differs from the one CreaRack trusted. This is not a wrong password. Only an administrator can accept the new key, from the same dialog.
Everything else (the limit of 5 open consoles per organization, a read-only role, a rejected password with a Use other credentials button) is a one-line notice.
Manual connection
For any host not registered in CreaRack:
- Press Manual Session in the sidebar.
- Enter IP Address / Host, Port (default 22), Username and Password.
- Press Connect.
Manual sessions always run on This PC and are temporary: they are not saved across reloads.
From the Rack Editor
Select a device with Network Management in a rack and press its terminal button. The Terminal page opens with the session already connecting, through the Primary agent when Run on says so. See [[crearack—racks—ssh-desde-rack]].
From a device card (Wireless, UPS, Signage, Observatory)
Open a device in Wireless, UPS or Signage and press Terminal in its header. The Terminal page opens in a separate window, smaller than the screen and with a coloured strip along its top edge so you can tell it apart from the main CreaRack window; it remembers the size you leave it at. It is named after the device: if the device has SSH credentials stored on its card, the session connects on its own; if not, the Manual SSH Session dialog opens with the IP address pre-filled. In Observatory the same button appears on devices that come from a rack; standalone monitors do not have it. All these buttons land on the Terminal page, so the Run on selector and the Remote console notice apply to them too.
The session toolbar
Every session, local or remote, has the same toolbar above the console:
- Quick Script and Run Script — send a saved command sequence to this session.
- Reconnect — restarts a This PC session. On a remote console reconnection is automatic (it only tells you so).
- Close Session — ends the SSH session on the device (you confirm first) and closes the tab.
- Close — closes the tab but keeps the session running: on This PC, in your Local Agent; on a remote console, on the device for up to 6 minutes, so you can get it back by clicking the device again or by reloading the page (see below).
- Files — the SFTP file browser, on both kinds of console. See [[crearack—terminal—sftp]].
- New Tab — moves this console to a new browser tab (the console survives the move; the old tab closes).
- Edit Card — the device card (identity, credentials, groups).
- REC — records the console output; press again to stop and the log file downloads (console-
- on a remote console). If a remote console closes while recording, the log downloads by itself..log - Theme, Size, Color — per-user console settings, saved in your browser and applied to every console.
How to manage open sessions
- Each session lives in a tab. Click a tab to switch. Sessions on This PC reconnect automatically when you return to the page. Remote consoles come back too: if you reload the page, or closed the tab with Close, the Terminal page reattaches to them for up to 6 minutes, with the previous output. After 6 minutes without a browser, the session closes on the device and frees its slot.
- Use the layout buttons (1x1, 2x1, 1x2, 2x2, 3x1) to view several sessions side by side, remote consoles included. Drag pane borders to resize.
- Cluster Mode broadcasts a command or a script to every connected session at once, local and remote. See [[crearack—terminal—cluster-mode]].
Switching organization with open consoles
Remote consoles keep running if you switch organization in another browser tab: that tab shows a fixed notice and the consoles stay connected to their client. If you switch in the same tab, CreaRack asks first: open the other organization in a new tab, switch and close the consoles (also the ones you parked with Close), or cancel.
Duplicating the browser tab (the browser’s own «Duplicate» command) copies the parked consoles to the copy; the original then shows «Opened in another tab».
Troubleshooting
- Session never opens on This PC — the Local Agent is not running. Start it or follow the Activate Bridge dialog.
- The terminal stays blank and then times out — the console opened from This PC and your computer cannot reach the device’s network. Check the notice under Run on: if remote access is off, an administrator turns it on there (button Turn on remote access) and the next click goes through the Primary agent.
- Primary agent is greyed out — remote access via Primary agent is off for the organization (see the notice and its button) or you do not have permission to use it. An offline or outdated Primary agent does not grey the option out: the line under the selector says why, and the click on a device shows the Primary agent is offline dialog.
- Managed device asks nothing but fails to log in — the stored credentials are wrong. Fix them on the device’s card, or press Use other credentials on a remote console.
- «The Primary agent needs an update (2.38.0) for key authentication» — you chose a credential with an SSH private key and the Primary agent is older than 2.38.0. Update the Agent on that computer, or use a credential with a password meanwhile.
- «The device’s identity has changed» — the device presented a different SSH host key. If it was replaced or reset, an administrator accepts the new key; otherwise do not connect. Administrators also see the pending keys in Organization Settings › Remote access via Primary agent.
- Console says «Reconnecting…» — the Primary agent lost its link to CreaRack (a deploy, a network blip). Wait: the session on the device is kept for up to 6 minutes and the output continues where it left off.
- A parked console did not come back — more than 6 minutes passed, or the account switched organization in the meantime; open the device again.
- More cases in [[crearack—terminal—troubleshooting-terminal]].
Related
- [[crearack—terminal—que-es-terminal]] — Terminal page overview
- [[crearack—terminal—local-agent]] — the bridge between browser and devices
- [[crearack—settings—remote-console]] — turning remote consoles on, watching and cutting them, pending host keys
- [[crearack—settings—credential-store]] — saved credentials, including SSH private keys
- [[crearack—terminal—sftp]] — transfer files over the active session, local or remote
- [[crearack—terminal—cluster-mode]] — run a command on many sessions at once
- [[crearack—terminal—todos-los-dispositivos]] — managed vs detected devices in the sidebar