Support Support Downloads Knowledge Base Apex 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

[Junos] Change the default management SSH port

0

0

Article ID: KB34689 KB Last Updated: 03 Aug 2019Version: 3.0
Summary:

This article provides the command and Junos OS version that supports changing the default SSH port on Juniper devices.

Solution:

The following command is used to change the SSH port:

set system services ssh port <port number> - Port number to accept incoming connections (1..65535)


Example:

1) SSHD is listening on the default port:

   user@router#show system services ssh | display set
   set system services ssh

   user@router# run show system connections extensive | match "22|50005" | match LISTEN
   tcp4     0      0  *.22        *.*      LISTEN

2) SSHD changed to listen on different port:

      user@router#show system services ssh | display set
   set system services ssh port 50005

   user@router# run show system connections extensive | match "22|50005" | match LISTEN   
   tcp4    0      0  *.50005      *.*      LISTEN


This feature is supported in the following versions and later.

Junos OS 12.3R12-S12
Junos OS 12.3R13
Junos OS 15.1R8
Junos OS 16.1R8
Junos OS 16.2R3
Junos OS 17.1R3
Junos OS 17.2R3
Junos OS 17.3R2
Junos OS 17.4R1
Junos OS 18.1R1

Modification History:
2019-08-03: Reformatted text output.
2019-07-27: Updated Junos OS versions and command output.

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