aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_protocol_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssh/test/ssh_protocol_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_protocol_SUITE.erl27
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/ssh/test/ssh_protocol_SUITE.erl b/lib/ssh/test/ssh_protocol_SUITE.erl
index dc02b940d7..132be3beb2 100644
--- a/lib/ssh/test/ssh_protocol_SUITE.erl
+++ b/lib/ssh/test/ssh_protocol_SUITE.erl
@@ -115,7 +115,8 @@ lib_works_as_client(Config) ->
[{set_options, [print_ops, print_seqnums, print_messages]},
{connect,
server_host(Config),server_port(Config),
- [{silently_accept_hosts, true},
+ [{preferred_algorithms,[{kex,['diffie-hellman-group1-sha1']}]},
+ {silently_accept_hosts, true},
{user_dir, user_dir(Config)},
{user_interaction, false}]},
receive_hello,
@@ -207,7 +208,9 @@ lib_works_as_server(Config) ->
end),
%% and finally connect to it with a regular Erlang SSH client:
- {ok,_} = std_connect(HostPort, Config).
+ {ok,_} = std_connect(HostPort, Config,
+ [{preferred_algorithms,[{kex,['diffie-hellman-group1-sha1']}]}]
+ ).
%%--------------------------------------------------------------------
%%% Matching
@@ -449,24 +452,24 @@ server_user_password(N, Config) -> lists:nth(N, ?v(user_passwords,Config)).
std_connect(Config) ->
- {User,Pwd} = server_user_password(Config),
- std_connect(server_host(Config), server_port(Config),
- Config,
- [{user,User},{password,Pwd}]).
+ std_connect({server_host(Config), server_port(Config)}, Config).
std_connect({Host,Port}, Config) ->
- {User,Pwd} = server_user_password(Config),
- std_connect(Host, Port, Config, [{user,User},{password,Pwd}]).
+ std_connect({Host,Port}, Config, []).
std_connect({Host,Port}, Config, Opts) ->
std_connect(Host, Port, Config, Opts).
std_connect(Host, Port, Config, Opts) ->
+ {User,Pwd} = server_user_password(Config),
ssh:connect(Host, Port,
- [{silently_accept_hosts, true},
- {user_dir, user_dir(Config)},
- {user_interaction, false} | Opts],
+ %% Prefere User's Opts to the default opts
+ [O || O = {Tag,_} <- [{user,User},{password,Pwd},
+ {silently_accept_hosts, true},
+ {user_dir, user_dir(Config)},
+ {user_interaction, false}],
+ not lists:keymember(Tag, 1, Opts)
+ ] ++ Opts,
30000).
-
%%%----------------------------------------------------------------