1# Secure Shell Access {#sec-ssh}
2
3Secure shell (SSH) access to your machine can be enabled by setting:
4
5```nix
6{ services.openssh.enable = true; }
7```
8
9By default, root logins using a password are disallowed. They can be
10disabled entirely by setting
11[](#opt-services.openssh.settings.PermitRootLogin) to `"no"`.
12
13You can declaratively specify authorised public keys for a user
14as follows:
15
16```nix
17{
18 users.users.alice.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAB3NzaC1kc3MAAACBAPIkGWVEt4..." ];
19}
20```