2023-12-07 09:05:24 -06:00
|
|
|
{ config, ... }:
|
2023-10-27 01:46:14 -05:00
|
|
|
{
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
2023-12-07 09:05:24 -06:00
|
|
|
# We set the hostkeys manually so they persist through reboots
|
|
|
|
hostKeys = [
|
|
|
|
{
|
|
|
|
path = (config.environment.persistence.ephemeral.persistentStoragePath + "/etc/ssh/ssh_host_ed25519_key");
|
|
|
|
type = "ed25519";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
sftpFlags = [
|
|
|
|
"-f AUTHPRIV"
|
|
|
|
"-l INFO"
|
|
|
|
];
|
|
|
|
extraConfig = ''
|
|
|
|
AllowUsers price
|
|
|
|
'';
|
2023-10-27 01:46:14 -05:00
|
|
|
settings = {
|
2023-10-27 23:02:52 -05:00
|
|
|
PasswordAuthentication = false;
|
2023-12-07 09:05:24 -06:00
|
|
|
PermitRootLogin = "no";
|
|
|
|
LogLevel = "VERBOSE";
|
2023-10-28 00:34:31 -05:00
|
|
|
KexAlgorithms = [
|
|
|
|
"curve25519-sha256"
|
|
|
|
"curve25519-sha256@libssh.org"
|
2023-12-07 09:05:24 -06:00
|
|
|
"diffie-hellman-group-exchange-sha256"
|
|
|
|
];
|
|
|
|
Ciphers = [
|
|
|
|
"chacha20-poly1305@openssh.com"
|
|
|
|
"aes256-gcm@openssh.com"
|
|
|
|
"aes128-gcm@openssh.com"
|
|
|
|
"aes256-ctr"
|
|
|
|
"aes192-ctr"
|
|
|
|
"aes128-ctr"
|
|
|
|
];
|
|
|
|
Macs = [
|
|
|
|
"hmac-sha2-512-etm@openssh.com"
|
|
|
|
"hmac-sha2-256-etm@openssh.com"
|
|
|
|
"umac-128-etm@openssh.com"
|
2023-10-28 00:34:31 -05:00
|
|
|
];
|
2023-10-27 01:46:14 -05:00
|
|
|
};
|
|
|
|
ports = [
|
|
|
|
2200
|
|
|
|
];
|
2023-12-07 09:05:24 -06:00
|
|
|
banner = ''
|
|
|
|
┌────────────────────────────────────────────────────┐
|
|
|
|
│ Orion Technologies - Security Notice │
|
|
|
|
│ ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ │
|
|
|
|
│ UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBITED │
|
|
|
|
│ │
|
|
|
|
│ You must have written, explicit, authorized │
|
|
|
|
│ permission to access or configure this device. │
|
|
|
|
│ Unauthorized attempts and actions to access or use │
|
|
|
|
│ this system may result in civil and/or criminal │
|
|
|
|
│ penalties. All activities performed on this device │
|
|
|
|
│ are logged and monitored. │
|
|
|
|
└────────────────────────────────────────────────────┘
|
|
|
|
'';
|
2023-10-27 01:46:14 -05:00
|
|
|
};
|
|
|
|
}
|