SRX

Expand all | Collapse all

How to change ssh default port for extra security in srx1500

  • 1.  How to change ssh default port for extra security in srx1500

    Posted 02-26-2017 20:17

    Hi all,

     

    i want to change ssh port to 2222 for extra security in srx 1500 , how to change it any configuration  pls...



  • 2.  RE: How to change ssh default port for extra security in srx1500

     
    Posted 02-27-2017 03:09

    Unfortunately, changing the inbound ssh port in Junos is not an option.

     

    All you can do is use either security policies with the destination zone junos-host to restrict access to your mgmt subnets only or the same thing by applying an re-protect firewall filter for the same purpose.



  • 3.  RE: How to change ssh default port for extra security in srx1500

    Posted 02-27-2017 07:32

    @Asifkhan wrote:

    Hi all,

     

    i want to change ssh port to 2222 for extra security 


    That will probably last for 15 mins or less and then it will be discovered by port scanners & mapped as open SSH port since SSH has a bad habit of advertising itself.

    But leaving the "security by obscurity" topic aside, You can do it in a couple of ways:

    1/ edit file /etc/services and put in whatever port You want for SSH, then restart sshd. These changes won't survive reboot.

    2/ use destination NAT for locally-terminated tcp/22 packets.

    HTH

    Thx
    Alex

     



  • 4.  RE: How to change ssh default port for extra security in srx1500

    Posted 02-28-2017 02:51

    how to do it in /etc/services bro..which editor i should use.i tried vim , gedit and nano but no one can do any thing ..

    Distinguished Expert


  • 5.  RE: How to change ssh default port for extra security in srx1500

    Posted 06-13-2019 00:50

    Please follow Below link to edit the files. 

     

    https://www.cs.colostate.edu/helpdocs/vi.html

     

    Regards,

    Ved (JNCIP-SEC)