aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_transport.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-02-22 12:11:05 +0100
committerHans Nilsson <[email protected]>2018-02-22 12:11:05 +0100
commit398dcda0815f12fb177bbb3bf68f6b424c2a62f2 (patch)
tree28cdd37f4c77fae6e7999507b07485fbd2e04cbb /lib/ssh/src/ssh_transport.erl
parent4a319977e7f8578435a97e700bebf65b3ee49992 (diff)
parent13c6a4bf01d39a5002e09ef1f82619cde9f2c90c (diff)
downloadotp-398dcda0815f12fb177bbb3bf68f6b424c2a62f2.tar.gz
otp-398dcda0815f12fb177bbb3bf68f6b424c2a62f2.tar.bz2
otp-398dcda0815f12fb177bbb3bf68f6b424c2a62f2.zip
Merge branch 'maint-20' into maint
* maint-20: Updated OTP version Prepare release ssh: Add option save_accepted_host ssh: No error message for signal kill ssh: Dont repeat supervisor defaults in map fields ssh: Move starting of channel child to ssh_channel_sup ssh: Test case for sup tree when shell server proc times out
Diffstat (limited to 'lib/ssh/src/ssh_transport.erl')
-rw-r--r--lib/ssh/src/ssh_transport.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl
index ad9efc4755..975053d301 100644
--- a/lib/ssh/src/ssh_transport.erl
+++ b/lib/ssh/src/ssh_transport.erl
@@ -889,10 +889,13 @@ known_host_key(#ssh{opts = Opts, key_cb = {KeyCb,KeyCbOpts}, peer = {PeerName,_}
{_,true} ->
ok;
{_,false} ->
+ DoAdd = ?GET_OPT(save_accepted_host, Opts),
case accepted_host(Ssh, PeerName, Public, Opts) of
- true ->
+ true when DoAdd == true ->
{_,R} = add_host_key(KeyCb, PeerName, Public, [{key_cb_private,KeyCbOpts}|UserOpts]),
R;
+ true when DoAdd == false ->
+ ok;
false ->
{error, rejected_by_user};
{error,E} ->