#+title: SSH Configuration Configure SSH. Keys should be added to the SSH agent. Specify the key file and use the system keychain. #+begin_src nix { config, pkgs, ... }: { programs.ssh = { enable = true; addKeysToAgent = "yes"; matchBlocks = { "*" = { identityFile = "~/.ssh/id_ed25519"; extraOptions = { "UseKeychain" = "yes"; }; }; #+end_src Here is my University of Manitoba computer science SSH server. My account is =janzenj2=. #+begin_src nix "aviary" = { hostname = "aviary.cs.umanitoba.ca"; user = "janzenj2"; setEnv = { "TERM" = "xterm"; }; }; #+end_src Here is my web server at =jjanzen.ca=. Set the =$TERM= variable to =xterm=. #+begin_src nix "jjanzen.ca" = { setEnv = { "TERM" = "xterm"; }; }; #+end_src Here is my oracle cloud instance login. Use the =opc= user and a provided key file. Set the =$TERM= variable to =xterm=. #+begin_src nix "oracle" = { setEnv = { "TERM" = "xterm"; }; hostname = "jjanzen.ca"; identityFile = "~/.ssh/oracle"; identitiesOnly = true; user = "opc"; }; }; }; } #+end_src