Run your first command
In this quickstart you add an SSH key for one server, trust the server's host key, and have the assistant run a command there. You need a running daemon with NOCTURN_MASTER_PASSPHRASE set, a phone on the home network, and a server you can log in to with a key.
1. Make a key for nocturn
Give nocturn a key of its own, without a passphrase (the vault encrypts it already), and allow it on the server:
ssh-keygen -t ed25519 -N '' -C nocturn -f ~/.ssh/nocturn_web
ssh-copy-id -i ~/.ssh/nocturn_web.pub admin@web.home.example2. Add it to nocturn
In the app, open Extensions, and under Built in tap SSH, then Add an SSH key:
| Field | Example |
|---|---|
| Hosts | web.home.example (several separated by commas; a port after a colon) |
| User | admin |
| Name | web-admin; the secret becomes vault/web-admin |
| Private key | the contents of ~/.ssh/nocturn_web |
Tap Add SSH key. The key appears under Keys, and the host under Hosts with host key asked at the first command. From the terminal instead:
nocturn secret set vault/web-admin --ssh-user admin --host web.home.example < ~/.ssh/nocturn_web3. Ask for a command
In a chat, send:
Is nginx running on web.home.example?The first time, up to three questions come in turn:
- Run a command on web.home.example as admin? with Host, User, Command (
systemctl status nginx) and Key. Leave Once and hold Hold to allow. - Trust the SSH host key of web.home.example? with Key type and Fingerprint. Compare the fingerprint with the server's own (step 4), then hold Hold to allow.
- A question about using the key
vault/web-adminon that host. Allow it.
The answer follows: the exit code and what the command printed.
4. Compare the fingerprint
On the server, print its host key's fingerprint and compare it with the sheet:
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pubThey must be the same. If they are not, deny: something sits between nocturn and the server.
5. Check the trusted host
Back under Extensions › SSH, the host now shows its key type, fingerprint and trusted … ago. Its key is kept in the workspace; the next command to it asks only about the command.