How to change the ssh (secure shell) port

book

Article ID: 168046

calendar_today

Updated On:

Products

XOS

Issue/Introduction

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

Resolution

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.

Workaround

N/A