Console and password access

The browser console of a server (text on the serial port, screen over VNC), the console relay behind it, and root password and SSH access.

Every server has a console in the browser with two tabs: Text, a terminal on the server's serial port, and Screen, its graphical screen over VNC. Both reach the node through the panel's console relay and the agent's existing port, so nodes open nothing new to the internet.

Open the console#

  1. Open the server.
  2. Click Open console in the page header (next to the power buttons).

The console opens in a window of its own (one per server: a second click brings the same window forward). It needs a running server. It is disabled while the server is suspended, while its node does not answer, and for a customer whose plan does not include the console.

The window's top bar shows the status, host name and address, the Text and Screen tabs, and the buttons of the open tab. The chosen tab is remembered per browser.

Text tab#

A terminal on the server's serial port (xterm). Use it for a login prompt, boot messages and a rescue shell.

  • Copy: select text (or Ctrl+Shift+C, or right-click › Copy).
  • Paste: Ctrl+V, Ctrl+Shift+V, Shift+Insert or right-click › Paste.
  • Scrollback: 10 000 lines. On connect it first shows the last 256 KiB of what the server printed, so you see the boot history.
  • Match window size: types stty rows R cols C and Enter for the window's size. A serial port does not tell the guest its size, so full-screen programs assume 80 × 24 until you do this. Use it at a shell prompt.
  • Fullscreen and Reconnect.

One text session per server at a time. A second one reads "The text console is open in another window or by another administrator."

Servers created before the text console existed get it after one power off and start from the panel (a restart from inside the guest is not enough). Until then the tab says "The text console becomes available after this server is powered off and started once."

Screen tab#

The server's screen (noVNC), scaled to the window. Use it for installers, Windows, and systems without a serial console.

  • Ctrl+Alt+Del sends the key combination.
  • Paste text opens a field whose content is typed into the server as key presses: letters, digits and symbols of a US keyboard layout, and Enter. Other characters are skipped and the page says how many.
  • Ctrl+V on the screen types the clipboard the same way. When the browser refuses clipboard access, the Paste text field opens instead.
  • Copying out of the screen is not possible: it is a picture.

Turn the screen console off for a server#

On the server's Settings tab, panel Console, switch off Screen console (VNC). The panel then gives no tickets for the screen; the text console still opens. Nothing is sent to the node. Whoever manages the server may change it; on a suspended server, administrators only.

Sessions#

  • Each connection uses a one-time ticket, valid for 30 seconds, that names one server on one node. Each ticket is recorded as vm.console_opened in the audit log.
  • A session ends when the window closes, the server stops, or after 2 hours ("The session reached its 2 hour limit."). Click Reconnect for a new one.
  • When a server is suspended, an open console window leaves for the server's page within 10 seconds, which ends the session.

The console relay#

The relay (vmstack-relay) is a small program that runs beside the panel. The browser opens a WebSocket to it; the relay checks the ticket and the page's origin, then connects to the node's agent on port 8443 with the panel's client certificate. The agent connects to the server's VNC or serial socket on the node's loopback only.

The panel installer sets it up as the vmstack-relay service (it runs php artisan vmstack:console-relay), and nginx serves it at wss://<your panel domain>/relay/. Check it:

systemctl status vmstack-relay

Without the relay everything works except the console: the window says "Could not connect to the console relay. Check that it is running and that this address is one of its allowed origins."

Setting (panel .env) Default What
VMSTACK_CONSOLE_URL wss://<your panel domain>/relay (installer) The address the browser connects to.
VMSTACK_CONSOLE_LISTEN a loopback address (installer) Where the relay listens. Keep it on loopback, behind nginx.
VMSTACK_CONSOLE_ORIGINS the origin of APP_URL Other page origins allowed, comma separated.

After php artisan vmstack:renew-client-certificate replaces the panel's client certificate, restart the relay:

systemctl restart vmstack-relay

Restarting the relay invalidates outstanding tickets; that is harmless at a 30-second lifetime.

Note: The relay and the web interface must share a cache store (the installer uses Redis). The relay puts its ticket key there, and php artisan cache:clear interrupts new console connections for a few seconds only.

Root password and SSH access#

SSH keys are optional when a server is created. In the create form:

  • Root password: Generate (the default: 20 letters and digits) or Set my own (12 to 72 characters, letters, digits and symbols of a US keyboard). It is stored encrypted.
  • Allow SSH login with the password: ticked by default when no key is given, unticked once one is. When ticked, the server allows root logins with the password over SSH.
  • SSH public keys: tick keys saved under Servers › SSH keys and paste others, one per line.

The password always works on the console. The server's Overview tab shows, under Connect, the SSH command and the Root password (Show, recorded as vm.password_revealed); Details shows SSH password login: Allowed / Not allowed and the SSH keys. A server with no key and no password login says "Nobody can log in over SSH: this server has no SSH key and does not allow logins with the password. Use the console."

Warning: A server with password login on a public address gets password guesses from bots all the time. Use a long password, or keys.

To change the password later, use Reset root password. To change the SSH keys, reinstall the server.

Troubleshooting#

See Servers troubleshooting for the console's messages and their fixes.