mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
nixos/tests/openssh: Fix test by using safe public keys
This commit is contained in:
parent
af12334ec9
commit
7a0980e5dc
@ -43,7 +43,7 @@ in {
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
||||
my $key=`${pkgs.openssh}/bin/ssh-keygen -t dsa -f key -N ""`;
|
||||
my $key=`${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f key -N ""`;
|
||||
|
||||
$server->waitForUnit("sshd");
|
||||
|
||||
@ -52,8 +52,8 @@ in {
|
||||
$server->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys");
|
||||
|
||||
$client->succeed("mkdir -m 700 /root/.ssh");
|
||||
$client->copyFileFromHost("key", "/root/.ssh/id_dsa");
|
||||
$client->succeed("chmod 600 /root/.ssh/id_dsa");
|
||||
$client->copyFileFromHost("key", "/root/.ssh/id_ed25519");
|
||||
$client->succeed("chmod 600 /root/.ssh/id_ed25519");
|
||||
|
||||
$client->waitForUnit("network.target");
|
||||
$client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'echo hello world' >&2");
|
||||
|
Loading…
Reference in New Issue
Block a user