Skip to main content

Remote Desktop

An RDP, VNC or SSH session, in the browser. A stored access entry opens in a window of its own, like the web terminal: no client software on your side and no port open on the customer's. The same rights, the same reason and approval, the same audit log, recordings and list of live sessions apply as for shells and tunnels.

How it works​

browser ──WebSocket──▶ dashboard ──▶ guacd ──▶ dashboard (one-shot listener)
│
▼
gateway relay ◀── agent (tunnel host, or the host itself) ──▶ target

The browser speaks the Guacamole protocol over a WebSocket to the dashboard. The dashboard hands it to guacd, the small service that turns RDP, VNC and SSH into that protocol. guacd does not connect to the customer's network itself: it is told to connect to a port of its own that the dashboard opens for that one session, and the dashboard carries those bytes through the gateway's relay to an agent, which connects to the target. Which agent follows the host's paths: the host's own agent, which only dials its own loopback and needs the desktop action (Agent Settings), or, when that is blocked by the agent's state, a tunnel host of the customer, whose own tunnel.allow decides what it may reach exactly as for any other tunnel. An SSH daemon that listens on one LAN address only does not answer on the loopback and ends in connection refused. The dashboard never dials a customer address.

The listener belongs to one session. It accepts a single connection, only from the address GUACD_HOST resolves to, and closes after that or after 30 seconds.

What it needs​

  • guacd. The guacd service of the shipped docker-compose.yml (guacamole/guacd). It publishes no port and keeps no data. The app reaches it through GUACD_HOST and GUACD_PORT, and it reaches the app through REMOTE_BRIDGE_HOST; see Configuration.
  • The gateway, with GATEWAY_URL set for the app, as for tunnels.
  • A route through an agent. The host of the entry is reached through a tunnel host, or (for RDP and VNC) through its own agent with the desktop action allowed. The item in browser is greyed with the reason when the agent is offline, not enrolled, too old or lacks the action, and left out for a host with neither an agent nor a tunnel host (it opens in the desktop app only). SSH on a host with its own agent opens here too, as a real login with the stored entry, through the agent's loopback port 22; the web terminal is a separate item. A tunnel host must be online and allow tunnels in its config.yaml, and its tunnel.allow must contain the target's network; see Tunnels. The reasons are listed under Opening a host.

Who may open one​

The access.tunnel permission at the entry's customer, also for the host's own agent, and the entry must be visible to the account. The customer's policies for tunnels apply: a reason where one is required, and approval where it is required. The approval covers tunnels, shells and certificates on that host, as it does everywhere else.

Credentials​

  • If the entry has a stored password and the account may copy passwords there (connection.reveal), the dashboard decrypts it and passes user name, password and domain to guacd. The password never reaches the browser, and the audit entry says credential: stored.
  • Otherwise guacd asks, and the window shows a small form for what is missing, which is also what a person without connection.reveal sees: they type the password themselves. For SSH it asks for the user name and password only; the domain field is for RDP. The values go to guacd and are not recorded. The audit entry says credential: entered.

What is set on the session​

For RDP the dashboard sets security negotiation to any (so NLA, TLS and RDP security all work), accepts the server's certificate, and lets the desktop resize with the window. Audio, drive redirection, printing and the wallpaper are off. The keyboard layout follows the browser's language: German for a German browser, US English otherwise. The time zone is the browser's. For VNC the user name is passed for servers that ask for one.

For SSH the terminal is xterm-256color with a grey-on-black scheme and a monospace font of size 12, the browser's locale is passed on, the connection sends a keep-alive every 30 seconds, the clipboard works and file transfer is off. An entry holds a password, not a key: password SSH works, and a host that accepts keys only fails with an authentication error. There are no jump hosts or SSH options any more. The first connection asks you to confirm the host key; see SSH host keys.

In the window​

A slim toolbar names the connection and its host and shows the state. It has Ctrl+Alt+Del, a Clipboard button that opens a floating panel carrying the clipboard as text in both directions (it does not resize the display), a button for the touch keys, fullscreen, scale to fit or 100 %, and Disconnect. The desktop scales to the window, and resizing the window resizes the remote desktop. If the browser blocks the popup, the session opens on its page at /access/sessions/<id>.

The bar also shows the time left until the session's 8-hour maximum. A window that is open and in view tells the server every minute that it is there, so a session watched in it is not taken for idle.

Touch keys​

On a touch screen the window opens with a key overlay; the toolbar button shows or hides it elsewhere. It docks at the bottom or the top of the window, and the choice is remembered per browser. It offers:

  • the modifiers Ctrl, Alt, Shift and Win, which stick: a tap applies to the next key, a double tap locks the modifier until tapped again;
  • Esc, Tab, the arrow keys, Home, End, PgUp, PgDn, Delete and F1 to F12;
  • combinations: Ctrl+Alt+Del, Ctrl+C, Ctrl+D, Ctrl+Z, Ctrl+L, Alt+Tab, Win and Win+R, and Ctrl+Alt+F1 to F6 in a graphical session;
  • Show keyboard, which brings up the device's on-screen keyboard.

The web terminal has the same overlay.

Reconnecting​

When a session has ended - the host rebooted, the connection was lost, the idle or time limit was reached, an administrator ended it - the window stays open on the last picture and offers Reconnect. It opens a new session to the same access entry in the same window and goes through the normal opening: the access.tunnel permission, the customer's reason, approval and recording policies, and for SSH the host key question. Nothing reconnects by itself, and a refusal (for instance for a right that was withdrawn) is shown as when opening. The new session is a session of its own in Access → Sessions.

The time limit​

Remove time limit lifts the 8-hour maximum for that session after a confirmation. The dashboard asks the host's agent, the gateway's relay and the tunnel record to give the maximum up, and only when all of them have does it stop ending the session at that time; the countdown then reads No time limit. Agent 3.3.4 or later and a gateway of the same release are needed. With an older one the limit stands, the button reports that it was not confirmed and the countdown keeps running. Only the session's own user, while they hold access.tunnel, and administrators may do it, and the lift is written to the audit log as remote.limit_lifted. A sign-in or approval window that is shorter than 8 hours still ends the session, and then the button is not offered.

SSH host keys​

guacd does not check an SSH server's key on its own, so the dashboard does it before anything is sent. It forwards the start of the SSH connection to guacd untouched, holds the server's key exchange reply and everything after it, reads the host key from that reply (it is still unencrypted), and lets the person decide:

  • No key stored for the entry: the window shows the algorithm and the SHA-256 fingerprint and asks you to confirm. Nothing, the password included, goes on until you accept; the key is then stored with the entry.
  • The stored key matches: the session goes on without a question.
  • A different key: the window shows the old and the new fingerprint with a warning and asks whether to overwrite. Without confirmation the session does not open.
  • No answer in 60 seconds, or a rejection: the session ends as host key rejected. A stream that is not SSH 2, or that sends no host key, ends as host key unreadable.

The answer only counts for the fingerprint that was shown. Confirming and overwriting are audited, and changing the entry's address or port clears the stored key. The prompt itself is not recorded. See Security for what this protects against.

Limits​

A session ends when

  • the person disconnects or closes the window,
  • no key, mouse or touch input arrived for 15 minutes and the window is not open and in view (the picture changing does not count; an open window counts as presence),
  • it has lasted 8 hours (unless the limit was removed), or the approval's or policy's window ended,
  • an administrator ends it under Access → Sessions, or the person loses access.tunnel or the entry,
  • the route is no longer there: the entry was deleted, the host trashed, its reachability changed or the agent lost the desktop, tunnel or terminal action (an agent that merely goes offline, or a guacd that is down, does not end it by itself),
  • the browser does not keep up with what guacd sends,
  • guacd, the tunnel or the target ends it.

A session whose browser never attaches expires after two minutes. The browser may only send input, resize, clipboard and the answers to a credential prompt, in messages of at most 64 KiB; anything else closes the session.

Recording​

Where the customer's Record sessions policy is on (the default), what guacd sends to the browser, SSH sessions included, is written to a file per session, gzip-compressed: <session id>.guac.gz in REMOTE_RECORDINGS_DIR. It is the Guacamole recording format, so the session page plays it back with seeking and speed control, and the download gives the plain .guac file. Keystrokes are never recorded; a password typed into the prompt is not in the recording, but anything shown on the screen, and clipboard text the remote side sends, is.

  • A recording stops at 1 GiB of recorded stream; the session goes on and is marked as truncated.
  • If the recording cannot be started (the directory is not writable), the session does not open.
  • Recordings are deleted after 90 days, together with the retention of shell recordings; the session's row stays as history.
  • Playing one back, or downloading it, is written to the audit log.

The files live in the volume remote_recordings, which is not in the database dump. See Backup and Restore.

Sessions and audit​

Remote sessions appear in Access → Sessions beside shells, with their kind (rdp, vnc or ssh) and the entry they were opened for, shown as the host's name and the protocol. The same limits, End now and live updates apply.

ActionWhen
remote.openA session started (with the entry and its host, the kind, whether the credential was stored or entered, and whether it is recorded), or the account was refused for lack of access.tunnel.
remote.closeA session ended, with the reason, its length and the bytes in each direction.
remote.limit_liftedThe 8-hour maximum of a running session was removed, with the session, the entry and its host.
remote.terminateAn administrator ended a session.
remote.replayA recording was played back or downloaded.

Opening the route writes its own tunnel.open entry, naming the entry, its host, the kind (tunnel or desktop) and how the host is reached. Confirming or replacing an SSH host key writes access.host_key_confirm or access.host_key_replace. See Audit Log.

Configuration​

VariableDefaultMeaning
GUACD_HOSTguacdWhere guacd runs. The compose file sets it to the service.
GUACD_PORT4822guacd's port.
REMOTE_BRIDGE_HOSTappThe name guacd uses to reach the app. It must resolve to the app from inside guacd's network; the compose service name does.
REMOTE_RECORDINGS_DIR/data/recordingsWhere recordings are written. The compose file mounts the volume remote_recordings there; the directory must be writable by the app's user.

If you run your own compose file, copy the guacd service, the volume and these variables from the shipped one; see Upgrading.

A reverse proxy has to pass WebSocket upgrades for /api/access/remote as it does for /api/live; see Installation → WebSockets.

API​

RequestMeaning
POST /api/access-entries/{id}/remoteBody { "width", "height", "dpi", "reason", "timezone", "locale" }; the last three are optional. 201 with { sessionId }, or 202 with { status: "pending_approval", requestId } while somebody has yet to approve. The browser then attaches at /api/access/remote?session=<sessionId> (WebSocket, subprotocol guacamole).
GET /api/access/sessions/{id}/recordingThe recording of a remote session as the decompressed .guac stream.

Refusals are codes: not_found, forbidden, no_rights, reason_required, protocol_not_remote (the entry is not RDP, VNC or SSH), the blocks of the route (no_browser_route, no_agent, tunnel_off, tunnel_host_required, offline, waiting_for_enrollment, tunnel_not_allowed, desktop_not_allowed, agent_outdated; see Opening a host), guacd_unavailable, and the tunnel's own (gateway_failed, gateway_unconfigured, too_many_launches). A script's token gets 403 token_kind_not_allowed; the desktop app does not reach these routes.

When something is wrong​

What you seeMeaning
The action fails with guacd unavailableguacd does not answer. Check that the guacd container runs and that GUACD_HOST names it.
The window closes at once with tunnel failedThe relay refused or was not reached, or guacd could not connect back to the app within 30 seconds. Check that REMOTE_BRIDGE_HOST resolves to the app from the guacd container, and GATEWAY_URL from the app.
Upstream refused the connection or DNS lookup failedguacd's own message: the agent could not reach the target. Check the tunnel host's tunnel.allow and the target's address and port.
The window closes with host key rejectedYou rejected the SSH host key, or did not answer within 60 seconds. Open the entry again and compare the fingerprint.
The window closes with host key unreadableThe connection did not speak SSH 2, or sent no host key. Check the address and port of the entry.
Authentication fails with a Windows targetA wrong user name, password or domain. Network Level Authentication needs all three right; enter them in the prompt instead of storing them to test.
Recording unavailableThe recordings directory is not writable by the app's user, or the volume is missing.