From 3fbc22fe43673401c37f862057d045ec90ad5670 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Wed, 3 May 2023 17:25:54 -0600 Subject: [PATCH] Install user keys in Darwin tests --- test/install_ssh_host_keys_darwin.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/install_ssh_host_keys_darwin.nix b/test/install_ssh_host_keys_darwin.nix index 78e1567..c826fa8 100644 --- a/test/install_ssh_host_keys_darwin.nix +++ b/test/install_ssh_host_keys_darwin.nix @@ -1,10 +1,17 @@ # Do not copy this! It is insecure. This is only okay because we are testing. { system.activationScripts.extraUserActivation.text = '' - echo "Installing SSH host key" + echo "Installing system SSH host key" sudo cp ${../example_keys/system1.pub} /etc/ssh/ssh_host_ed25519_key.pub sudo cp ${../example_keys/system1} /etc/ssh/ssh_host_ed25519_key sudo chmod 644 /etc/ssh/ssh_host_ed25519_key.pub sudo chmod 600 /etc/ssh/ssh_host_ed25519_key + + echo "Installing user SSH host key" + mkdir -p $HOME/.ssh + cp ${../example_keys/user1.pub} $HOME/.ssh/id_ed25519.pub + cp ${../example_keys/user1} $HOME/.ssh/id_ed25519 + chmod 644 $HOME/.ssh/id_ed25519.pub + chmod 600 $HOME/.ssh/id_ed25519 ''; }