Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

Multiple routers can generate duplicate SSH private keys due to missing entropy



Article ID: JSA10434 SECURITY_ADVISORIES Last Updated: 09 May 2013Version: 1.0
Legacy Advisory Id:
Product Affected:
All JUNOS devices with SSH enabled.
Due to the way entropy (source of randomization) was obtained in JUNOS, there exists the remote possibility that multiple identically configured routers, purchased at the same time and configured to generate their initial SSH private key at the same time, may end up with the same private keys. The sources of entropy in the affected releases was limited, and therefore the pseudo-random number generator (PRNG) used as input to the SSH key generation may result in the same values across multiple systems. This issue was mostly prevalent in systems without ATA disk controllers or Compact Flash memory.

This issue is being tracked as PR 469038. While this PR is not viewable by customers, it can be used as a reference when discussing the issue with JTAC.
All JUNOS software releases built on or after February 1, 2010, have been enhanced to derive entropy from additional sources such as network activity. Releases containing the enhancement specifically include: 8.5S6, 9.0S3, 9.1S8, 9.3S8, 9.6S4, 10.0S3, 10.1R1, and all subsequent releases.


Any method to determine uniqueness of the public keys in /etc/ssh will confirm or deny the existence of this issue. One such method is shown below:
user@junos1> start shell
% foreach file ( /etc/ssh/*.pub )
foreach? ssh-keygen -l -f "$file"
foreach? end
1024 6d:c0:26:ad:3d:68:17:c5:92:61:e0:66:5b:2c:56:57 /etc/ssh/
1024 65:09:0e:d6:1d:b4:a5:11:0f:e7:b2:d3:0b:eb:4d:d0 /etc/ssh/
2048 13:15:6c:ed:8f:2f:57:2c:2a:d4:5f:f6:54:f9:ce:98 /etc/ssh/
compared to router 2:
user@junos2> start shell
% foreach file ( /etc/ssh/*.pub )
foreach? ssh-keygen -l -f "$file"
foreach? end
1024 46:88:29:08:36:dc:a0:21:fd:7c:dd:f5:eb:bd:25:3e /etc/ssh/
1024 4d:92:07:49:e6:5b:e7:2e:b6:90:92:8f:77:c5:96:2b /etc/ssh/
2048 23:39:88:dc:33:fd:ef:8b:e9:3d:06:5e:5d:a4:55:8b /etc/ssh/
Since the fingerprints of the public keys don't match, these two routers are not affected by this issue.

Should the keys match on two or more routers, simply disable SSH, delete the SSH host keys, and re-enable SSH:
user@junos> configure
Entering configuration mode
user@junos# delete system services ssh

user@junos# commit and-quit
commit complete
Exiting configuration mode

user@junos> start shell
% su
root@junos% rm /etc/ssh/ssh_host*
root@junos% exit
% exit

user@junos> configure
Entering configuration mode
user@junos# set system services ssh

user@junos#  commit and-quit
commit complete
Exiting configuration mode


How to obtain Service Releases:

Security vulnerabilities are fixed in the next available Maintenance Release of each supported JUNOS version. In some cases, a Maintenance Release is not planned to be available in an appropriate time-frame. For these cases, Service Releases are made available in order to be more timely. Security Advisory notices will indicate which Maintenance and/or Service Releases contain fixes for the issues described. Upon request to JTAC, customers will be provided download instructions for a Service Release. Although Juniper does not provide formal Release Note documentation for a Service Release, a list of "PRs fixed" can be provided on request.
CVSS Score:
8.7 (AV:N/AC:L/Au:S/C:C/I:P/A:C/E:P/RL:U/RC:C)
Severity Level:
Severity Assessment:

Information for how Juniper Networks uses CVSS can be found at KB 16446 "Common Vulnerability Scoring System (CVSS) and Juniper's Security Advisories" available in the Related Links section above.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search