ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How to change the ssh (secure shell) port


Article ID: 168046


Updated On:




This procedure explains how to change the ssh port on the C30 and X40N/A


Use the following procedure to change the SSH (secure shell) port on the C30 and X40 from the default of 22 to another value. In this example the port is being changed to 2244.

1.       Access the secure shell config directory.

# cd /etc/ssh

# vi sshd_config

2.       Add the following line above #Port22

Port 2244

3.       Exit and save file

4.       Stop and restart the ssh daemon

# /etc/rc.d/init.d/sshd stop ()

# /etc/rc.d/init.d/sshd start

If you need the changes to persist after a reboot, edit /cbconfig/conf/etc/running-config/sshd_config, and then do a wr in CLI to save the changes. The changes will be saved to the /cbconfig/conf/etc/saved-config/sshd_config file, and /etc/ssh/sshd_config will be updated.