diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-02-23 16:46:45 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-02-23 17:00:07 +0100 |
commit | b70bd0879b12cccd0a2e41a88ecdd047f977118f (patch) | |
tree | 9cd2b9f141f0896bb3cd6ebd04ee83ff7e49153f /nixos/modules/services/networking/ssh | |
parent | 8e4a8494be43c8173e2bd6dbdc524239654f0264 (diff) | |
download | nixlib-b70bd0879b12cccd0a2e41a88ecdd047f977118f.tar nixlib-b70bd0879b12cccd0a2e41a88ecdd047f977118f.tar.gz nixlib-b70bd0879b12cccd0a2e41a88ecdd047f977118f.tar.bz2 nixlib-b70bd0879b12cccd0a2e41a88ecdd047f977118f.tar.lz nixlib-b70bd0879b12cccd0a2e41a88ecdd047f977118f.tar.xz nixlib-b70bd0879b12cccd0a2e41a88ecdd047f977118f.tar.zst nixlib-b70bd0879b12cccd0a2e41a88ecdd047f977118f.zip |
sshd: Generate a ed25519 host key
Diffstat (limited to 'nixos/modules/services/networking/ssh')
-rw-r--r-- | nixos/modules/services/networking/ssh/sshd.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index c0ad9e17c413..a7617d02c185 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -195,12 +195,14 @@ in default = [ { path = "/etc/ssh/ssh_host_dsa_key"; type = "dsa"; - bits = 1024; } { path = "/etc/ssh/ssh_host_ecdsa_key"; type = "ecdsa"; bits = 521; } + { path = "/etc/ssh/ssh_host_ed25519_key"; + type = "ed25519"; + } ]; description = '' NixOS can automatically generate SSH host keys. This option @@ -323,7 +325,7 @@ in ${flip concatMapStrings cfg.hostKeys (k: '' if ! [ -f "${k.path}" ]; then - ssh-keygen -t "${k.type}" -b "${toString k.bits}" -f "${k.path}" -N "" + ssh-keygen -t "${k.type}" ${if k ? bits then "-b ${toString k.bits}" else ""} -f "${k.path}" -N "" fi '')} ''; |