Skip to content

Commit

Permalink
constants,readme: update default host key algo order
Browse files Browse the repository at this point in the history
  • Loading branch information
mscdex committed Feb 24, 2020
1 parent 881cf9c commit 5156dcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,15 @@ SSH2Stream methods

* Default values:

1. ssh-rsa
1. ssh-ed25519 **(node v12.0.0 or newer)**
2. ecdsa-sha2-nistp256 **(node v5.2.0 or newer)**
3. ecdsa-sha2-nistp384 **(node v5.2.0 or newer)**
4. ecdsa-sha2-nistp521 **(node v5.2.0 or newer)**
5. ssh-rsa

* Supported values:

* ssh-ed25519 **(node v12.0.0 or newer)**
* ssh-rsa
* ecdsa-sha2-nistp256 **(node v5.2.0 or newer)**
* ecdsa-sha2-nistp384 **(node v5.2.0 or newer)**
Expand Down
4 changes: 2 additions & 2 deletions lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ var KEX_BUF = Buffer.from(DEFAULT_KEX.join(','), 'ascii');
SUPPORTED_KEX = DEFAULT_KEX.concat(SUPPORTED_KEX);

var DEFAULT_SERVER_HOST_KEY = [
'ssh-rsa',
'ecdsa-sha2-nistp256',
'ecdsa-sha2-nistp384',
'ecdsa-sha2-nistp521'
'ecdsa-sha2-nistp521',
'ssh-rsa',
];
if (eddsaSupported)
DEFAULT_SERVER_HOST_KEY.unshift('ssh-ed25519');
Expand Down

0 comments on commit 5156dcd

Please sign in to comment.