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

ssh

Declarative SSH config with per-host options and zmx (persistent tmux-like sessions over SSH) integration.

Options

All options under atelier.ssh:

OptionTypeDefaultDescription
enableboolfalseEnable SSH config management
extraConfigstring""Raw SSH config appended to the end

zmx

OptionTypeDefaultDescription
zmx.enableboolfalseInstall zmx and autossh
zmx.hostslist of strings[]Host patterns to auto-attach via zmx

When zmx is enabled for a host, the SSH config injects RemoteCommand, RequestTTY force, and ControlMaster/ControlPersist settings. Shell aliases are also added: zmls, zmk, zma, ash.

Hosts

Per-host config under atelier.ssh.hosts.<name>:

OptionTypeDefaultDescription
hostnamestringSSH hostname or IP
portint or nullnullSSH port
userstring or nullnullSSH user
identityFilestring or nullnullPath to SSH key
forwardAgentboolfalseForward SSH agent
zmxboolfalseEnable zmx for this host
extraOptionsattrsOf string{}Arbitrary SSH options

Example

atelier.ssh = {
  enable = true;
  zmx.enable = true;
  zmx.hosts = [ "terebithia" "ember" ];

  hosts = {
    terebithia = {
      hostname = "terebithia";
      user = "kierank";
      forwardAgent = true;
      zmx = true;
    };
    "github.com" = {
      identityFile = "~/.ssh/id_rsa";
    };
  };
};