mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 20:08:28 +01:00
Compare commits
No commits in common. "caebd6e24187e5f699979424c104a0b9abda9e63" and "d83843e5e16c5b5b1c5100d6bc20af3edffb36d3" have entirely different histories.
caebd6e241
...
d83843e5e1
1 changed files with 5 additions and 5 deletions
|
|
@ -123,7 +123,7 @@
|
|||
client1NetCfg = nodes.client1.custom.networking;
|
||||
client2NetCfg = nodes.client2.custom.networking;
|
||||
|
||||
ssh = "timeout 5 ssh -i /etc/ssh-key -o BatchMode=yes -o ConnectTimeout=3 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
|
||||
sshOptions = "-i /etc/ssh-key -o BatchMode=yes -o ConnectTimeout=3 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
|
||||
in
|
||||
''
|
||||
start_all()
|
||||
|
|
@ -157,11 +157,11 @@
|
|||
server.succeed("ping -c 1 client2")
|
||||
|
||||
with subtest("SSH access restricted by role"):
|
||||
client1.succeed("${ssh} seb@server 'echo Hello'")
|
||||
client1.succeed("${ssh} seb@client2 'echo Hello'")
|
||||
server.fail("${ssh} seb@client2 'echo Hello'")
|
||||
client1.succeed("ssh ${sshOptions} seb@server 'echo Hello'")
|
||||
client1.succeed("ssh ${sshOptions} seb@client2 'echo Hello'")
|
||||
server.fail("ssh ${sshOptions} seb@client2 'echo Hello'")
|
||||
|
||||
with subtest("SSH not reachable on underlay"):
|
||||
client1.fail("${ssh} seb@${serverNetCfg.underlay.address} 'echo Hello'")
|
||||
client1.fail("ssh ${sshOptions} seb@${serverNetCfg.underlay.address} 'echo Hello'")
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue