aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2015-04-22 13:39:46 +0200
committerErlang/OTP <[email protected]>2015-04-22 13:39:46 +0200
commitda3d366a75aa089ef7594e1e28940637f16c1682 (patch)
tree1db419e58b7f5c86fe5acc4c9d2b92e8b713caaa /lib/ssh/src/ssh.erl
parent871c5af1e44a423106d644ca6e70900ad21d41b4 (diff)
parent20707ef7688bed44fec39c4673a8823211e94149 (diff)
downloadotp-da3d366a75aa089ef7594e1e28940637f16c1682.tar.gz
otp-da3d366a75aa089ef7594e1e28940637f16c1682.tar.bz2
otp-da3d366a75aa089ef7594e1e28940637f16c1682.zip
Merge branch 'hans/ssh/banner_grabbing/OTP-12659' into maint-17
* hans/ssh/banner_grabbing/OTP-12659: ssh: added id_string option for server and client
Diffstat (limited to 'lib/ssh/src/ssh.erl')
-rw-r--r--lib/ssh/src/ssh.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 51ad691ba2..d4b02a024e 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -347,6 +347,8 @@ handle_option([parallel_login|Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option({parallel_login,true}) | SshOptions]);
handle_option([{minimal_remote_max_packet_size, _} = Opt|Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{id_string, _ID} = 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).
@@ -439,6 +441,10 @@ handle_ssh_option({idle_time, Value} = Opt) when is_integer(Value), Value > 0 ->
Opt;
handle_ssh_option({rekey_limit, Value} = Opt) when is_integer(Value) ->
Opt;
+handle_ssh_option({id_string, random}) ->
+ {id_string, {random,2,5}}; %% 2 - 5 random characters
+handle_ssh_option({id_string, ID} = Opt) when is_list(ID) ->
+ Opt;
handle_ssh_option(Opt) ->
throw({error, {eoptions, Opt}}).