mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-22 01:30:48 +03:00
Install user keys in Darwin tests
This commit is contained in:
parent
0155c5710e
commit
3fbc22fe43
1 changed files with 8 additions and 1 deletions
|
@ -1,10 +1,17 @@
|
||||||
# Do not copy this! It is insecure. This is only okay because we are testing.
|
# Do not copy this! It is insecure. This is only okay because we are testing.
|
||||||
{
|
{
|
||||||
system.activationScripts.extraUserActivation.text = ''
|
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.pub} /etc/ssh/ssh_host_ed25519_key.pub
|
||||||
sudo cp ${../example_keys/system1} /etc/ssh/ssh_host_ed25519_key
|
sudo cp ${../example_keys/system1} /etc/ssh/ssh_host_ed25519_key
|
||||||
sudo chmod 644 /etc/ssh/ssh_host_ed25519_key.pub
|
sudo chmod 644 /etc/ssh/ssh_host_ed25519_key.pub
|
||||||
sudo chmod 600 /etc/ssh/ssh_host_ed25519_key
|
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
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue