8.1. Host Manager

The Host Manager view lets you define and test the connections to the machines Retrospective reads log data from. Open it with View ‣ Host Manager or with the i-host-manager Host Manager toolbar button. You can also press Ctrl+Z; on macOS, press Cmd+Z.

Host definitions are required for searching and monitoring log data on machines reached through the intranet or the internet. They are used by data sources defined on the fly (ad hoc) and by those bundled in a profile. Hosts can be grouped into folders.

This page describes what is common to both host types. The settings specific to each type are described in Linux and Unix Hosts and Windows Hosts.

The Host Manager view — host tree, editor and context menu

Fig. 8.2 The Host Manager view.

The numbered markers identify the main areas of the view.

  1. The host-tree toolbar: i-host-expand-all Expand all, i-host-collapse-all Collapse all, i-new-folder New folder, i-host-add Add host, i-host-clone Clone selected host and i-host-delete Delete selected node(s).

  2. The host tree, where SSH and Windows hosts are grouped into folders. A host whose definition is incomplete or wrong carries a yellow or red mark on its icon; point at it to read why.

  3. The host context menu, opened by right-clicking a host.

  4. The host editor, with its Standard and Advanced tabs.

  5. The Host compatibility information table, shown after every Test.

8.1.1. Create a New Host

  1. Click i-host-add Add host on the host-tree toolbar, or choose Add host in a folder’s context menu.

  2. In Folder Name, pick a folder, type the name of a new one, or leave the field empty. The folder of the current selection is proposed.

  3. Choose the host type: SSH Host (the default) for log files on a Linux machine (other Unix systems on a best-effort basis), or Windows Host for Windows Event Logs. Then click OK.

  4. Retrospective adds the host at once and selects it. Its description is a placeholder, <user>@<host>:22 for an SSH host and <user>@<host> for a Windows host.

  5. Provide the connection parameters and the authentication information, as described in Linux and Unix Hosts and Windows Hosts.

  6. Click Test to check that the host can be reached.

  7. Click Save to store the definition.

While a host with the placeholder description exists, Add host refuses a second one: A host with the default name <user>@<host>:22 already exists. Complete that host and change its description before adding a new host. For a Windows host, the message names <user>@<host>.

Test is available as soon as the form is valid. Save and Check connectivity become available once you change something. Check connectivity is selected by default. Save then runs the test first and stores the host only if the test reports no error. Clear the box to save without a test. A save that removes a stored password or keyphrase is never tested, because there is nothing left to connect with.

While a search or monitoring run uses the host, Test and Save are refused: Cannot test the connection to a host that is used in an ongoing search or monitoring session. and Cannot save a host that is used in an ongoing search or monitoring session.

The host name or address may also be localhost or another loopback address. That reaches, for example, a Docker container whose SSH or WinRM port is published on this computer. Such a host is always connected to over SSH or WinRM, like any other host.

The description, however, cannot be localhost or local drive, in any of the application’s languages. Those names belong to the built-in entries for this computer in the Event Log Browser and the File Browser. Retrospective rejects them: This description is reserved for the local computer. Choose a different description.

While a connectivity test or a save is running, the host form is locked. A progress indicator appears next to Check connectivity. The form becomes editable again as soon as the operation finishes. A save also locks the host tree and its toolbar for the duration.

8.1.2. Delete Host

  1. Select the host definition.

  2. Click i-host-delete Delete selected node(s), press Delete, or choose Delete in the context menu.

  3. Confirm with Delete in the Delete selected dialog.

When profiles use the host, the confirmation lists them and adds: When hosts are deleted, related data sources are removed from your profiles. Otherwise it asks Are you sure you want to delete?

Deleting a folder deletes the hosts it contains. A second question lists the hosts in the folder that you had not selected, and asks whether to continue.

The delete is refused while a host is used by a running search or by an open SSH Console: Cannot delete a host that is used in an ongoing search or monitoring session. or Cannot delete host that is used in an open SSH console

Note

Retrospective removes the deleted host’s data sources from every profile that holds them.

Retrospective switches hosts that use the deleted host as their jump server to Direct Access.

Deleting the host you are editing also discards any unsaved changes in the host form. Retrospective then selects the neighboring host, or clears the form when no host is left.

8.1.3. Edit Host

  1. Select the host definition to display the connection details.

  2. Change the connection parameters and click Save.

If you select another host while the form holds unsaved changes, the Discard Changes dialog asks Are you sure you want to discard your changes? Discard drops them; Cancel, the default, keeps you on the edited host.

8.1.4. Host Context Menu

Right-click a host in the tree and choose a function from the context menu. A folder has a shorter menu: Add host, Rename, Batch edit and Delete.

Menu item

Description

i-host-rename Rename

Switches the tree entry to edit mode, so you can change the host’s description directly in the tree. Press Enter or select another entry to finish. Double-clicking an entry also starts the edit, for hosts and folders alike. Renaming a folder moves all of its hosts to the new name.

A blank name is rejected (The description must not be blank), and so is a description another host of the same type already uses (The same description is already used for another host.). The comparison is case-sensitive. Renaming a folder to a name another folder already uses, in any capitalization, is rejected: A folder with this name already exists.

i-host-clone Clone

Creates a copy of the selected host, stores it and selects it. The copy’s description is the original’s with (copy) appended. A number such as (2) is added when that description is taken as well. Adapt the description and the connection parameters, then click Save.

Batch edit

Selects every host in the same folder, or every host outside folders, and opens the batch editor (see Editing Several Hosts at Once). It is unavailable when several hosts are already selected, or when the group holds a single host.

i-assign-to-folder Assign to folder

Assigns all selected hosts to the folder of your choice. To create a folder, choose i-new-folder New folder… in the submenu. The New folder dialog asks Please enter the folder name. A blank name is rejected (The name must not be blank), and so is a name that is already used, in any capitalization: A folder with this name already exists.

You can also drag hosts and drop them on a folder.

Note

Moving hosts out of a folder can leave it empty, shown with a grayed-out folder icon i-empty-folder. Empty folders are not stored. They disappear when you close the Host Manager.

i-remove-from-folder Remove from folder

Moves the selected hosts out of their folder to the top level of the tree. You can also drag hosts and drop them on the top level.

i-copy-textual Copy (Textual)

Copies the host definition as text to the clipboard, for example to paste into a document. Only SSH hosts are written out, so a selection of Windows hosts produces no output.

i-ssh-console New SSH Console

Opens a new SSH Console connected to the selected host, with the configured authentication method and credentials. Available for a single SSH host only.

i-host-delete Delete

Deletes the selected hosts (see Delete Host above).

8.1.5. Editing Several Hosts at Once

Retrospective can change the credentials of many hosts in one step, which keeps a password or key rotation from turning into a host-by-host edit.

Select the hosts first. Hold Ctrl or Shift and click them, or right-click a folder and choose Batch edit to take every host it contains. On macOS, hold Cmd instead of Ctrl. With two or more hosts selected, the right-hand panel switches from the single-host editor to the batch editor.

The batch editor shows how many hosts the selection holds and offers one action per credential kind. Each row has a Change or Switch button. A button stays disabled while the selection contains no host it applies to.

Row

Description

Selected hosts in total: n

Number of hosts the batch applies to. Delete selected deletes every one of them.

Change password for n host(s)

Opens Change password for the SSH hosts that authenticate with a password. Enter the Username and the Password, then click Change.

Change SSH keys for n SSH host(s)

Opens Change SSH key for the SSH hosts that authenticate with a key. Enter the Username. If the key is protected, type its passphrase in Keyphrase first. Then click the … button next to SSH key and choose the private key file. The key is read into Retrospective and stored encrypted; see SSH Keys.

Switch n SSH-key host(s) to password

Opens Change password for the SSH hosts that authenticate with a key. Afterwards they log in with the entered username and password, and sudo uses that password too. Retrospective forgets the key it held for them; a key file on disk is left untouched.

Switch n password host(s) to SSH key

Opens Change SSH key for the SSH hosts that authenticate with a password. When the sudo of one of them requires a password, the dialog also asks for the Sudo password, which is stored for those hosts.

Change credentials for n Windows host(s)

Opens Change Windows credentials for the selected Windows hosts that sign in with a password. Enter the Username and the Password. Hosts that use an SSH key or Kerberos SSO are not counted.

Every dialog applies the same value to all hosts in its group, and each one says so above its fields. Click Cancel to leave a dialog without a change.

Note

Deleting hosts asks for confirmation, as described under Delete Host. The delete is refused while one of the selected hosts is used by a running search or by an open SSH Console; close them first.

Changing passwords, SSH keys or Windows credentials is refused while a host it would change is used by a running search: Cannot save a host that is used in an ongoing search or monitoring session. The same applies to switching the authentication method. Stop the search first.

8.1.6. Import Host Configurations

Retrospective reads host definitions from two sources:

  • the OpenSSH configuration file ~/.ssh/config of the account you are logged on with. From each entry it reads Host, Hostname, User, Port and IdentityFile; an entry without Hostname is skipped, and Match blocks are ignored. A missing or invalid Port means port 22.

  • PuTTY, on Windows only. Retrospective reads the SSH sessions PuTTY saves in the Windows Registry, under HKCU\Software\SimonTatham\PuTTY\Sessions. No PuTTY files are read.

The PuTTY source requires the preference Allow reading saved PuTTY sessions. It is in the Windows Registry group of the General preferences page and is selected by default.

The first time the Host Manager opens after Retrospective starts, the Reading Windows Registry? dialog asks for your consent. Yes lets Retrospective read the sessions until it exits. No clears the preference. Closing the dialog declines for this session only and leaves the preference as it is; the question returns the next time Retrospective starts. The General Preferences link closes the dialog and opens that page, where you can clear the preference yourself; until then the question is asked again the next time the Host Manager opens.

Windows registry consent dialog

Fig. 8.3 The Reading Windows Registry? dialog.

A source that returns no entry is left out. When neither source returns one, the Import from box stays hidden.

Host import panel with PuTTY sessions

Fig. 8.4 Host definitions read from PuTTY, listed under Import from.

  1. Select a source in the Import from box to display its host definitions. The table shows Host, Port, Username, Method and Description. Select Do not show existing hosts to hide entries you already have.

  2. To read all sources again, click i-host-import-reload Reload in a source row.

  3. Import a host definition with a single click on the import icon in the first column, or with a double-click anywhere on the row.

  4. Retrospective stores the host straight away, removes it from the import table and selects it in the host tree. An imported host has no password, and an IdentityFile is kept as a file path. Edit the connection parameters as needed and click Save.

Note

When importing hosts, PuTTY private keys (*.ppk) are ignored. Retrospective currently only supports OpenSSH keys. A number of guides on the internet explain how to convert a PuTTY private key into an OpenSSH key, for example https://www.simplified.guide/putty/convert-ppk-to-ssh-key.