tests/keycloak: add non-working ssh config for clients

This commit is contained in:
b12f 2024-08-24 23:49:31 +02:00 committed by teutat3s
parent eb337ddd47
commit c469a8a2dc
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
2 changed files with 24 additions and 0 deletions

View file

@ -64,6 +64,7 @@ in {
testScript = '' testScript = ''
start_all() start_all()
join_all()
nachtigall.wait_for_unit("system.slice") nachtigall.wait_for_unit("system.slice")
nachtigall.succeed("ping 127.0.0.1 -c 2") nachtigall.succeed("ping 127.0.0.1 -c 2")

View file

@ -12,6 +12,29 @@
(builtins.readFile ./step/certs/root_ca.crt) (builtins.readFile ./step/certs/root_ca.crt)
]; ];
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PermitRootLogin = lib.mkForce "yes";
PermitEmptyPasswords = lib.mkForce "yes";
PasswordAuthentication = lib.mkForce true;
};
};
security.pam.services.sshd.allowNullPassword = true;
virtualisation.forwardPorts = let
address = (builtins.elemAt config.networking.interfaces.eth0.ipv4.addresses 0).address;
lastAddressPart = builtins.elemAt (lib.strings.splitString "." address) 3;
in [
{
from = "host";
host.port = 2000 + (lib.strings.toInt lastAddressPart);
guest.port = 22;
}
];
networking.interfaces.eth0.useDHCP = false; networking.interfaces.eth0.useDHCP = false;
networking.hosts = { networking.hosts = {