aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-08-27 12:05:15 +0200
committerFredrik Gustafsson <[email protected]>2012-08-27 12:05:15 +0200
commit3d70c115603add4d4a4c975a41bffa22b13e4c6f (patch)
tree1cd4ba42a6e189ae807980ab7607d212f20aba1b /lib/ssh
parent5472a54b7f952c08e794eb52175d3724cc2937db (diff)
parentea2ad51e8522b1305ea2aa1043458df4ac432784 (diff)
downloadotp-3d70c115603add4d4a4c975a41bffa22b13e4c6f.tar.gz
otp-3d70c115603add4d4a4c975a41bffa22b13e4c6f.tar.bz2
otp-3d70c115603add4d4a4c975a41bffa22b13e4c6f.zip
Merge branch 'sze/ssh-auth_methods/OTP-10224' into maint
* sze/ssh-auth_methods/OTP-10224: Corrected some documentation according to original SSH: Make "auth_methods" server option re-usable
Diffstat (limited to 'lib/ssh')
-rw-r--r--lib/ssh/doc/src/ssh.xml14
-rw-r--r--lib/ssh/src/ssh.erl4
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index e30c6f1ccc..b84b3a3dcb 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -259,11 +259,17 @@
that identifies the host for ssh. The default is
<c><![CDATA[/etc/ssh]]></c>, note that SSH normally
requires the host files there to be readable only by
- root.</p>
+ root.</p>
+ </item>
+ <tag><c><![CDATA[{auth_methods, string()}]]></c></tag>
+ <item>
+ <p>Comma separated string that determines which authentication methodes that the server
+ should support and in what order they will be tried. Defaults to
+ <c><![CDATA["publickey,keyboard_interactive,password"]]></c></p>
</item>
- <tag><c><![CDATA[{user_passwords, [{string() = User, string() = Password}]}]]></c></tag>
- <item>
- <p>Provide passwords for password authentication.They will
+ <tag><c><![CDATA[{user_passwords, [{string() = User, string() = Password}]}]]></c></tag>
+ <item>
+ <p>Provide passwords for password authentication.They will
be used when someone tries to connect to the server and
public key user authentication fails. The option provides
a list of valid user names and the corresponding password.
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index f4a40c81a4..85f5f680e6 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -369,6 +369,8 @@ handle_option([{shell, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{exec, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{auth_methods, _} = Opt | Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, [handle_inet_option(Opt) | SocketOptions], SshOptions).
@@ -408,6 +410,8 @@ handle_ssh_option({exec, {Module, Function, _}} = Opt) when is_atom(Module),
is_atom(Function) ->
Opt;
+handle_ssh_option({auth_methods, Value} = Opt) when is_list(Value) ->
+ Opt;
handle_ssh_option({infofun, Value} = Opt) when is_function(Value) ->
Opt;
handle_ssh_option({connectfun, Value} = Opt) when is_function(Value) ->