Junos
Highlighted
Junos

changing ssh port to 2222 in junos

‎02-26-2017 12:45 AM

Hi all,

i want to change my ssh port from default(22) port to port no 2222.any command in junos to do this for me..pls share your experience ....

 

 

Thanks ,

 

Asif Khan

1 REPLY 1
Junos

Re: changing ssh port to 2222 in junos

‎03-19-2017 09:16 PM

Hi Asifkhan,

When you enable SSH service using "set system services SSH" , SSH will start running on port 22 and you cannot change that. 

If you want to block connections to port 22, we can use firewall filter or if you want to use some other ports to do SSH, we can use destination NAT rule to redirect requests coming to any other ports to port 22.

 

Thanks,

Anand

 

 

If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.