summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2021-06-15 22:50:37 +0200
committerGitHub <noreply@github.com>2021-06-15 22:50:37 +0200
commit6dc9b7d83297d860a9ac1cb0747658aff63203ba (patch)
treeb4e3623c12f0caf99ca12673c528670ccea95b60
parentMerge pull request #126974 from NixOS/backport-126966-to-release-21.05 (diff)
parentnixos/ssh: Document authorizedKeysFiles properly (diff)
downloadnixpkgs-6dc9b7d83297d860a9ac1cb0747658aff63203ba.tar.gz
Merge pull request #126986 from NixOS/backport-126922-to-release-21.05
[Backport release-21.05] nixos/ssh: Add an example of verbatim keys
-rw-r--r--nixos/modules/services/networking/ssh/sshd.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
index 3cc77e4cb938..7ac0952defe6 100644
--- a/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -41,6 +41,10 @@ let
Warning: If you are using <literal>NixOps</literal> then don't use this
option since it will replace the key required for deployment via ssh.
'';
+ example = [
+ "ssh-rsa AAAAB3NzaC1yc2etc/etc/etcjwrsh8e596z6J0l7 example@host"
+ "ssh-ed25519 AAAAC3NzaCetcetera/etceteraJZMfk3QPfQ foo@bar"
+ ];
};
keyFiles = mkOption {
@@ -243,7 +247,17 @@ in
authorizedKeysFiles = mkOption {
type = types.listOf types.str;
default = [];
- description = "Files from which authorized keys are read.";
+ description = ''
+ Specify the rules for which files to read on the host.
+
+ This is an advanced option. If you're looking to configure user
+ keys, you can generally use <xref linkend="opt-users.users._name_.openssh.authorizedKeys.keys"/>
+ or <xref linkend="opt-users.users._name_.openssh.authorizedKeys.keyFiles"/>.
+
+ These are paths relative to the host root file system or home
+ directories and they are subject to certain token expansion rules.
+ See AuthorizedKeysFile in man sshd_config for details.
+ '';
};
authorizedKeysCommand = mkOption {