Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh: custom config key types #40686

Merged
merged 1 commit into from
Jul 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 25 additions & 3 deletions nixos/modules/programs/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,29 @@ in
'';
};

# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.)
pubkeyAcceptedKeyTypes = mkOption {
type = types.listOf types.str;
default = [
"+ssh-dss"
];
example = [ "ssh-ed25519" "ssh-rsa" ];
description = ''
Specifies the key types that will be used for public key authentication.
'';
};

hostKeyAlgorithms = mkOption {
type = types.listOf types.str;
default = [
"+ssh-dss"
];
example = [ "ssh-ed25519" "ssh-rsa" ];
description = ''
Specifies the host key algorithms that the client wants to use in order of preference.
'';
};

extraConfig = mkOption {
type = types.lines;
default = "";
Expand Down Expand Up @@ -189,9 +212,8 @@ in

ForwardX11 ${if cfg.forwardX11 then "yes" else "no"}

# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.)
PubkeyAcceptedKeyTypes +ssh-dss
HostKeyAlgorithms +ssh-dss
PubkeyAcceptedKeyTypes ${concatStringsSep "," cfg.pubkeyAcceptedKeyTypes}
HostKeyAlgorithms ${concatStringsSep "," cfg.hostKeyAlgorithms}

${cfg.extraConfig}
'';
Expand Down