CA API Gateway: How can the SSH port be changed?

Document ID : KB000115131
Last Modified Date : 21/09/2018
Show Technical Document Details
Question:
How can the default port, 22, be changed for SSH access?
Answer:
1. Login to the appliance via SSH using the ssgconfig user
2. You will be presented with the ssgconfig menu, select option 3 (Use a privileged shell)
3. Now that you are at the root prompt edit the sshd_config file

Run the following command:

vi /etc/ssh/sshd_config

4. Locate the following line:

# Port 22
Remove # and change 22 to your desired port number.

5. Restart the sshd service by running the following command:

service sshd restart

6. Now login to the Gateway using the policy manager
7. Navigate to TASKS -> TRANSPORTS -> MANAGE LISTEN PORTS
8. Click 'Manage Firewall Rules'
9. On the firewall rules screen click CREATE
10. Create a new firewall rules
Name: any descriptive name you would like
Rule Action: Accept
Interface: specify a particular or all interfaces
Protocol: TCP
From Port: This will be the port you defined in step 4

Once this rule is created you will now be able to SSH over the new port. Access of port 22 will not be revoked.