Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Logins and certificates

credentials.toml

A URL can contain the login of a server:

[[source]]
url = "ftp://games:secret@nas.local/roms/gba/"

Do not share a file with a password in it. Kiln also reads logins from credentials.toml in its own folder, which is App/Kiln/ on the Miyoo and Kiln/ on the RG35XXSP. Kiln reads the file at start, so restart Kiln after you change it. Settings has no row for this file.

["sftp://nas.local"]
user = "games"
key = "keys/nas"

["webdavs://alice@cloud.example.org"]
password = "app-password-here"

["ftps://nas.local:2121"]
user = "games"
password = "secret"
fingerprint = "sha256:3f0a..."

["smb://nas.local"]
user = "games"
password = "secret"

The name of each table is the server’s address, scheme://host, with the user and the port when they matter, as in scheme://user@host:port. A table has these keys:

KeyMeaning
userThe user name.
passwordThe password.
keyFor SFTP, the path of a private key, relative to Kiln’s folder. The key must have no passphrase.
fingerprintThe fingerprint of the server’s certificate, or of the SFTP host key. See below.
insecuretrue turns off the certificate check of HTTPS, WebDAV and FTPS.

For a source, Kiln first uses the user and password of its URL. Then it uses the table that names the URL’s user, and then the table without a user.

Certificates

Kiln checks the certificates of HTTPS, WebDAVS and FTPS servers against the list of certificate authorities that it ships. A server at home with a self-signed certificate fails that check. Two keys accept such a server:

  • fingerprint = "sha256:<hex>" accepts only the certificate with that fingerprint. This is the safe choice.
  • insecure = true accepts any certificate.

This command prints the fingerprint of a server’s certificate on a computer:

openssl s_client -connect nas.local:443 </dev/null 2>/dev/null \
  | openssl x509 -noout -fingerprint -sha256

For an FTPS server, add -starttls ftp and use its FTP port, such as nas.local:21. The command prints sha256 Fingerprint=3F:0A:.... Write it in credentials.toml as sha256:3F:0A:.... Kiln accepts the hex digits with or without colons, in upper or lower case.

SFTP host keys

On the first connection to an SFTP server, Kiln saves the server’s key in known_hosts in its folder. A different key on a later connection is an error, which stops another server from posing as yours. After you reinstall the server, delete its line from known_hosts.

For SFTP, fingerprint names the host key instead, in OpenSSH’s format SHA256:<base64>, and Kiln then ignores known_hosts. This command prints it on the server:

ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub