Installing a key on a server
Install key puts a keychain key's public half into ~/.ssh/authorized_keys on a cluster for you: one sign-in with your password, a backup, and a test.
In short
- Install key signs in once with your password (and a code, if the server asks), adds the key's public half to ~/.ssh/authorized_keys only if it is not there yet, and then signs in with the key to prove it works.
- If that file already has something in it, HiveBoard first copies it to authorized_keys.bak followed by the date and time.
- Your password is used for that one sign-in and not stored. This is the only change HiveBoard makes on a server outside job control.
A key signs you in only once its public half is listed in ~/.ssh/authorized_keys on the
server. Install key puts it there for you — the job ssh-copy-id does in a terminal — using
your password once. After that, a server set to sign in with that key no longer needs your
password — and if the key has no passphrase and the server asks no code, it connects by itself.
What happens on the server
- HiveBoard signs in with your password, and the one-time code if the server asks for one. The server’s identity is checked first, as on every connection.
- It makes sure
~/.sshexists. - If the key is already in
~/.ssh/authorized_keys, it stops there and says so. - If the file has anything in it, it copies the file to
~/.ssh/authorized_keys.bak.followed by the date and time, such asauthorized_keys.bak.20261019-143005. - It adds one line to the file: the key’s public half.
- It signs in again with the key alone, to prove that it works.
Nothing else on the server is changed, and the private key never leaves your computer. Your password goes to the server for that one sign-in and is then discarded. The install is noted in the connection log with the key’s fingerprint and name — never with the password.
While adding a server
On the Sign-in step of Add a server:
- Choose SSH key (or Key + code).
- Under Key, keep Create a new key for this server, or pick a key from your keychain.
- Type Your password on the server — it is for installing the key — and the One-time code if the server asks for one.
- Press Install key.
HiveBoard makes the key if it has to (an Ed25519 key, named after the server), then says Key installed. — or Key already on the server. — and whether it signed in with it. Then go on with Test connection. If you installed the key some other way already, skip Install key.
For a server you already have
- Open Connections → Keychain and press Install on a server… on the key’s card. (On a server’s Connection tab, Install this key on Ember… opens the same sheet with that server chosen.)
- Choose the Server.
- Type your Password on that server.
- If the server also asks for a code, tick The server also asks for a one-time code and type the One-time code. It is ticked for you when the server signs in with a code.
- If the key has a passphrase, type it under Key passphrase, so that HiveBoard can prove the key works afterwards.
- Press Install key.
When it worked, the sheet says Key installed. and HiveBoard signed in with it — it works.,
and names the backup it kept. If the key worked and the server does not sign in with it yet, it
offers Sign in to Ember with this key from now on, which switches the server to that key —
and, for a server that was an alias from ~/.ssh/config, makes it self-contained at the same
time.
Once your keychain has a key, a server that signs in with a password suggests this on its Connection tab: Tired of typing it?, with a link to install a key. On a server that signs in with a key, Create a new key on the same tab makes a key and then opens this sheet for that server.
When the server asks for more
Some servers ask something beyond the password and the code: a PIN and then a token, or a new password when the old one has run out. During an install the question appears in a small window of its own, in the server’s words. It is asked once; closing the window gives the install up and sends the server nothing in the answer’s place. See When a server asks more.
If it does not work
- But signing in with it failed — the key was added, but signing in with it did not work; the reason follows. Some servers do not take keys at all: Check server says which sign-in methods a server accepts.
- The key has a passphrase and none was given — it was added, but could not be tried. Type the passphrase under Key passphrase next time.
- The server would not take the key — adding the line failed; the server’s own message follows.
If the server’s sign-in had been refused, press Try again on its page once the key is installed: HiveBoard does not ask a server that refused it again until you do (see A refused sign-in).
Taking a key off again
HiveBoard never removes a line from authorized_keys. To take a key off a server, delete its
line there yourself; the backup holds the file as it was before. Deleting a key from the
keychain does not remove it from servers either — but without its private
half, nobody can use it.
Check yourself
2 quick questions on this page. Nothing is sent anywhere.
-
What does Install key do with the password you type?
- Uses it once to sign in and add the key, then discards it
- Keeps it in the keychain beside the key
- Sends it again whenever the key is refused
Show the answer
Uses it once to sign in and add the key, then discards it The password is used for the one sign-in that adds the key; it is not stored.
-
Your authorized_keys on Ember already holds the key. What does Install key change there?
- Nothing — it reports that the key was already installed
- It adds a second copy of the line
- It replaces the file with a fresh one
Show the answer
Nothing — it reports that the key was already installed The key is added only if it is absent; otherwise HiveBoard stops and says the key was already there.
Try it in the app
On your own computer, with HiveBoard open. Tick them off as you go.
Related
Written for HiveBoard 0.1.7, the version on the download page. Examples use a made-up cluster (Ember) and person (zoe). Something here not what you see? Report it from the app.