aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_options.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ssh/src/ssh_options.erl')
-rw-r--r--lib/ssh/src/ssh_options.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_options.erl b/lib/ssh/src/ssh_options.erl
index f98422c324..78f68dbcb1 100644
--- a/lib/ssh/src/ssh_options.erl
+++ b/lib/ssh/src/ssh_options.erl
@@ -578,7 +578,16 @@ default(common) ->
{auth_methods, def} =>
#{default => ?SUPPORTED_AUTH_METHODS,
- chk => fun check_string/1,
+ chk => fun(As) ->
+ try
+ Sup = string:tokens(?SUPPORTED_AUTH_METHODS, ","),
+ New = string:tokens(As, ","),
+ [] == [X || X <- New,
+ not lists:member(X,Sup)]
+ catch
+ _:_ -> false
+ end
+ end,
class => user_options
},