aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_options_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-12-01 15:22:41 +0100
committerHans Nilsson <[email protected]>2016-12-14 11:46:47 +0100
commiteec0a0751e2a7ca7e32731fcd05f0a6032e1062f (patch)
treeaa6b59454dceaab04ea3beb2badb32003d515703 /lib/ssh/test/ssh_options_SUITE.erl
parent7300d01bedaed1fbb213378d43589b4448aa5d3b (diff)
downloadotp-eec0a0751e2a7ca7e32731fcd05f0a6032e1062f.tar.gz
otp-eec0a0751e2a7ca7e32731fcd05f0a6032e1062f.tar.bz2
otp-eec0a0751e2a7ca7e32731fcd05f0a6032e1062f.zip
ssh: [test] remove 'known_hosts' interference in test suite
Diffstat (limited to 'lib/ssh/test/ssh_options_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_options_SUITE.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/ssh/test/ssh_options_SUITE.erl b/lib/ssh/test/ssh_options_SUITE.erl
index 8f060bebd8..86f5cb1746 100644
--- a/lib/ssh/test/ssh_options_SUITE.erl
+++ b/lib/ssh/test/ssh_options_SUITE.erl
@@ -831,10 +831,13 @@ supported_hash(HashAlg) ->
really_do_hostkey_fingerprint_check(Config, HashAlg) ->
PrivDir = proplists:get_value(priv_dir, Config),
- UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
- file:make_dir(UserDir),
+ UserDirServer = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDirServer),
SysDir = proplists:get_value(data_dir, Config),
+ UserDirClient =
+ ssh_test_lib:create_random_dir(Config), % Ensure no 'known_hosts' disturbs
+
%% All host key fingerprints. Trust that public_key has checked the ssh_hostkey_fingerprint
%% function since that function is used by the ssh client...
FPs = [case HashAlg of
@@ -857,7 +860,7 @@ really_do_hostkey_fingerprint_check(Config, HashAlg) ->
%% Start daemon with the public keys that we got fingerprints from
{Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SysDir},
- {user_dir, UserDir},
+ {user_dir, UserDirServer},
{password, "morot"}]),
FP_check_fun = fun(PeerName, FP) ->
@@ -876,7 +879,7 @@ really_do_hostkey_fingerprint_check(Config, HashAlg) ->
end},
{user, "foo"},
{password, "morot"},
- {user_dir, UserDir},
+ {user_dir, UserDirClient},
{user_interaction, false}]),
ssh:stop_daemon(Pid).