Skip to content

Instantly share code, notes, and snippets.

@rehno-lindeque
Last active February 27, 2019 17:58
Show Gist options
  • Save rehno-lindeque/1e8f5f957b598432dfbecad15b54ad94 to your computer and use it in GitHub Desktop.
Save rehno-lindeque/1e8f5f957b598432dfbecad15b54ad94 to your computer and use it in GitHub Desktop.
Quickly enable ssh in nixos ( https://git.io/fhNKV )
{ ... }:
# Temporarily enable ssh
{
services = {
# Enable the OpenSSH daemon.
openssh = {
enable = true;
# Use for initial login
permitRootLogin = "yes"; # todo: mkForce
# Larger MaxAuthTries helps to avoid ssh 'Too many authentication failures' issue
# See https://github.com/NixOS/nixops/issues/593#issue-203407250
extraConfig = ''
MaxAuthTries 20
'';
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment