Keys and security
Melta signs in to your computer with an SSH key or password that lives only on your phone. This page explains how keys are made and kept, and what leaves the phone.
Keys made on the phone
When you open Add Host, Melta generates a new Ed25519 key pair on the phone, the same type ssh-keygen -t ed25519 makes, using the phone's secure random number generator. The public key ends in melta-iphone or melta-android, so you can recognise it in ~/.ssh/authorized_keys.
- The private key is saved in the iOS Keychain or Android Keystore when you tap Add Host. It is never sent to Melta's server or to your computer.
- The public key is the only part that leaves the phone. It is inside the setup command you paste on the computer, which adds it to
~/.ssh/authorized_keys.
Each computer you add gets its own key.
Your own key or a password
On the Own SSH Host tab you can paste a private key you already use, with its passphrase if it has one, or sign in with a password. Both are stored the same way, in the Keychain or Keystore, and never sent to Melta's server. For password sign-in, Melta tries plain password authentication and then keyboard-interactive, which macOS uses.
Switch a computer to a phone key
If a computer uses a password or a key from elsewhere, you can give it a key made on this phone without opening a terminal:
- Open the computer, tap ⋯ › Edit Host.
- Under Sign-in, choose New Key.
- Under Add the key to your computer, enter the computer's login password and tap Add Key with Password.
- When it says Key added and working, tap Save.
Melta signs in once with the password, adds the public key to ~/.ssh/authorized_keys, then signs in again with the key to check it works. The password is used once and not saved. You can also run the setup command shown under Herdr and notifications, which adds the key too, or tap Copy Public Key and add it yourself.
If you save a new key before it has been added to the computer, Melta warns you that the computer will not accept it yet.
Copy a saved key
In Edit Host, with Current Key selected, Copy Saved Key copies the private key, for example to use it for another computer. Melta warns you first, because anyone with the key can sign in to that machine. The clipboard is cleared after 60 seconds if it still holds the key.
What never leaves the phone
- Private keys, passphrases and passwords.
- The saved host key fingerprints (see First connection).
- Your terminal sessions and agent conversations. They travel over SSH between the phone and your computer only.
Some things do go through Melta's server: your list of computers (name, address, port and user, without any secret), the pane name and question text in a notification, sent by the plugin on your computer, and any chat you choose to share. Images you attach go to your computer over SSH, into ~/.melta/uploads. See What the server stores.
Removing access
- Remove Host in Edit Host deletes the computer and the key or password saved for it on this phone.
- The public key stays in
~/.ssh/authorized_keyson the computer until you delete that line. Look for the one ending inmelta-iphoneormelta-android. - A new phone does not get your keys; add a key for it in Edit Host.