From e5715f37dcfd9c21103232e699390d9736180923 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 13 May 2015 17:36:24 +0200 Subject: ssh: New option 'preferred_algorithms' This option enables the user to define which algorithms that are to be used as well as their precedences in the negotiation between server and client. --- lib/ssh/doc/src/ssh.xml | 100 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) (limited to 'lib/ssh/doc') diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml index df13442fc6..3e7726c24d 100644 --- a/lib/ssh/doc/src/ssh.xml +++ b/lib/ssh/doc/src/ssh.xml @@ -35,13 +35,15 @@
SSH - + For application dependencies see ssh(6) Supported SSH version is 2.0. + Supported public key algorithms: ssh-rsa and ssh-dss. Supported MAC algorithms: hmac-sha2-256 and hmac-sha1. Supported encryption algorithms: aes128-ctr, aes128-cb and 3des-cbc. Supported key exchange algorithms: diffie-hellman-group1-sha1. + Supported compression algorithms: none, zlib, zlib@openssh.com, Supports unicode filenames if the emulator and the underlaying OS support it. See section DESCRIPTION in the file manual page in kernel @@ -79,6 +81,18 @@ ssh_channel(3)

channel_init_args() =

list()

+ + algs_list() = +

list( alg_entry() )

+ + alg_entry() = +

{kex, simple_algs()} | {public_key, simple_algs()} | {cipher, double_algs()} | {mac, double_algs()} | {compression, double_algs()}

+ + simple_algs() = +

list( atom() )

+ + double_algs() = +

[{client2serverlist,simple_algs()},{server2client,simple_algs()}] | simple_algs()

@@ -160,19 +174,57 @@ and password. However, those optins are not always desirable to use from a security point of view.

+ + +

This option is kept for compatibility. It is ignored if the preferred_algorithms + option is used. The equivalence of {public_key_alg,'ssh-dss'} is + {preferred_algorithms, [{public_key,['ssh-dss','ssh-rsa']}]}.

+

Sets the preferred public key algorithm to use for user authentication. If the preferred algorithm fails, the other algorithm is tried. The default is to try first.

+ + +

This option is kept for compatibility. It is ignored if the preferred_algorithms + option is used. The equivalence of {pref_public_key_algs,['ssh-dss']} is + {preferred_algorithms, [{public_key,['ssh-dss']}]}.

+

List of public key algorithms to try to use. 'ssh-rsa' and 'ssh-dss' are available. Overrides

+ + + +

List of algorithms to use in the algorithm negotiation. The default algs_list() can + be obtained from default_algorithms/0. +

+

Here is an example of this option:

+ +{preferred_algorithms, + [{public_key,['ssh-rsa','ssh-dss']}, + {cipher,[{client2server,['aes128-ctr']}, + {server2client,['aes128-cbc','3des-cbc']}]}, + {mac,['hmac-sha2-256','hmac-sha1']}, + {compression,[none,zlib]} +} + +

Note that we want different algorithms in the two directions for cipher, but the same in + both directions for mac and compression. We keep the default for kex and + public_key but has given the default value explicitly for public_key

+ +

Changing the values can make a connection less secure. Do not change unless you + know exactly what you are doing. If you do not understand the values then you + are not supposed to change them

+
+
+

Sets a time-out on the transport layer @@ -341,6 +393,32 @@ user. From a security perspective this option makes the server very vulnerable.

+ + + +

List of algorithms to use in the algorithm negotiation. The default algs_list() can + be obtained from default_algorithms/0. +

+

Here is an example of this option:

+ +{preferred_algorithms, + [{public_key,['ssh-rsa','ssh-dss']}, + {cipher,[{client2server,['aes128-ctr']}, + {server2client,['aes128-cbc','3des-cbc']}]}, + {mac,['hmac-sha2-256','hmac-sha1']}, + {compression,[none,zlib]} +} + +

Note that we want different algorithms in the two directions for cipher, but the same in + both directions for mac and compression. We keep the default for kex and + public_key but has given the default value explicitly for public_key

+ +

Changing the values can make a connection less secure. Do not change unless you + know exactly what you are doing. If you do not understand the values then you + are not supposed to change them

+
+
+ boolean()}]]>

Provides a function for password validation. This function is called @@ -445,6 +523,26 @@ + + default_algorithms() -> algs_list() + Get a list declaring the supported algorithms + +

Returns a key-value list, where the keys are the different types of algorithms and the values are the + algorithms themselves. An example:

+ +20> ssh:default_algorithms(). +[{kex,['diffie-hellman-group1-sha1']}, + {public_key,['ssh-rsa','ssh-dss']}, + {cipher,[{client2server,['aes128-ctr','aes128-cbc','3des-cbc']}, + {server2client,['aes128-ctr','aes128-cbc','3des-cbc']}]}, + {mac,[{client2server,['hmac-sha2-256','hmac-sha1']}, + {server2client,['hmac-sha2-256','hmac-sha1']}]}, + {compression,[{client2server,[none,zlib]}, + {server2client,[none,zlib]}]}] +21> + + + shell(Host) -> -- cgit v1.2.3