figbell

All articles

Guides

Importing ~/.ssh/config and SSH keys into Konsela

How Konsela brings the servers in ~/.ssh/config and their IdentityFile keys into the library, and how the fingerprint is verified on the first connection.

Konsela sets up the server library in one go by reading your existing OpenSSH configuration. Connecting to a server is done with the desktop application, which is in preparation. In the browser, the library is prepared and exported, but the browser cannot establish SSH connections.

What is read?

Every Host block without wildcard characters becomes a server. The HostName, User, Port, ProxyJump and IdentityFile lines are read. A jump host specified with ProxyJump is also used for the connection.

Steps

  1. Choose the File › Import ~/.ssh/config command. In the desktop application, the file is read automatically; in the browser, you select the file.
  2. The window lists the servers. Those already in the library are marked "already in library". Select with All, New only or None.
  3. In the desktop application, the Also import SSH keys option also brings in the keys specified with IdentityFile. Each key is listed with the servers that use it; for keys protected by a passphrase, the passphrase is requested.
  4. Finish with Add to library.

A copy of the keys is stored on this device with the operating system's encryption (macOS Keychain, Windows DPAPI, Linux libsecret) and linked to the corresponding servers. A key already saved on this device is not added a second time. In the browser, only the servers are added.

The Keys section

Keys that are not in the config file are added with Import in the Keys section: OpenSSH, PEM or PuTTY (.ppk) format. If a new key is needed, Generate key creates an ED25519 key pair. The command obtained with Copy command to add to server is run once in a session opened on the server with a password.

In the Mac App Store version, the system's SSH agent and the ~/.ssh folder cannot be accessed; keys are imported in this section by selecting files.

The first connection

When connecting to a server for the first time, its fingerprint is shown. Compare this value with the one obtained from the server's administrator and confirm it; it is then saved. If the fingerprint changes later, the connection is stopped and the old and new values are shown side by side. If the reason for the change is unknown, it should not be accepted.

Moving the library

File › Export library writes the servers, saved commands and forwardings to a JSON file. Passwords and private keys are not written to this file; they are entered again on another device.

The Konsela page shows the status of the desktop application.