Commit 685bf11b authored by Daniel P. Berrangé's avatar Daniel P. Berrangé

scripts: disable known hosts file

Despite having StrictHostKeyChecking=no, SSH still complains about the
host key mismatch and disables password auth as a result. Using
/dev/null as the known_hosts file ensures the keys are never saved to
the user's profile.
Reviewed-by: 's avatarLaine Stump <laine@laine.org>
Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
parent 8ae15358
...@@ -97,7 +97,8 @@ diag "ssh'ing into $guestip"; ...@@ -97,7 +97,8 @@ diag "ssh'ing into $guestip";
my $ssh = Net::OpenSSH->new($guestip, my $ssh = Net::OpenSSH->new($guestip,
user => "root", user => "root",
password => $tck->root_password(), password => $tck->root_password(),
master_opts => [-o => "StrictHostKeyChecking=no"]); master_opts => [-o => "UserKnownHostsFile=/dev/null",
-o => "StrictHostKeyChecking=off"]);
# now bring eth0 down, change MAC and bring it up again # now bring eth0 down, change MAC and bring it up again
diag "fiddling with mac"; diag "fiddling with mac";
......
...@@ -91,7 +91,8 @@ diag "ssh'ing into $guestip"; ...@@ -91,7 +91,8 @@ diag "ssh'ing into $guestip";
my $ssh = Net::OpenSSH->new($guestip, my $ssh = Net::OpenSSH->new($guestip,
user => "root", user => "root",
password => $tck->root_password(), password => $tck->root_password(),
master_opts => [-o => "StrictHostKeyChecking=no"]); master_opts => [-o => "UserKnownHostsFile=/dev/null",
-o => "StrictHostKeyChecking=no"]);
# now bring eth0 down, change IP and bring it up again # now bring eth0 down, change IP and bring it up again
diag "preparing ip spoof"; diag "preparing ip spoof";
......
...@@ -119,7 +119,8 @@ diag "ssh'ing into $guestip"; ...@@ -119,7 +119,8 @@ diag "ssh'ing into $guestip";
my $ssh = Net::OpenSSH->new($guestip, my $ssh = Net::OpenSSH->new($guestip,
user => "root", user => "root",
password => $tck->root_password(), password => $tck->root_password(),
master_opts => [-o => "StrictHostKeyChecking=no"]); master_opts => [-o => "UserKnownHostsFile=/dev/null",
-o => "StrictHostKeyChecking=no"]);
# now generate a mac broadcast paket # now generate a mac broadcast paket
diag "generate mac broadcast"; diag "generate mac broadcast";
......
...@@ -100,7 +100,8 @@ diag "ssh'ing into $guestip"; ...@@ -100,7 +100,8 @@ diag "ssh'ing into $guestip";
my $ssh = Net::OpenSSH->new($guestip, my $ssh = Net::OpenSSH->new($guestip,
user => "root", user => "root",
password => $tck->root_password(), password => $tck->root_password(),
master_opts => [-o => "StrictHostKeyChecking=no"]); master_opts => [-o => "UserKnownHostsFile=/dev/null",
-o => "StrictHostKeyChecking=no"]);
# now generate a arp spoofing packets # now generate a arp spoofing packets
diag "generate arpspoof script"; diag "generate arpspoof script";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment