mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-08-16 15:41:03 +02:00
fix: openssh config in nixos 23.05
This commit is contained in:
@ -40,13 +40,15 @@ To illustrate how to use `/etc/nixos/configuration.nix`, let's consider an examp
|
||||
];
|
||||
};
|
||||
|
||||
# Enable openssh-server
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no"; # Disable root login
|
||||
passwordAuthentication = false; # Disable password login
|
||||
settings = {
|
||||
X11Forwarding = true;
|
||||
PermitRootLogin = "no"; # disable root login
|
||||
PasswordAuthentication = false; # disable password login
|
||||
};
|
||||
openFirewall = true;
|
||||
forwardX11 = true; # Enable X11 forwarding
|
||||
};
|
||||
|
||||
# Omit the rest of the configuration...
|
||||
@ -68,4 +70,4 @@ To find configuration options and documentation:
|
||||
|
||||
## References
|
||||
|
||||
- [Overview of the NixOS Linux distribution](https://nixos.wiki/wiki/Overview_of_the_NixOS_Linux_distribution)
|
||||
- [Overview of the NixOS Linux distribution](https://nixos.wiki/wiki/Overview_of_the_NixOS_Linux_distribution)
|
||||
|
Reference in New Issue
Block a user