1

similar question (CentOS 6.4): Changing SSH Default Port 22 to 444

similar question (restart the ssh daemon on ubuntu1404):How can I restart the SSH daemon on Ubuntu?

  • If I can not ask question about ubuntu1404, please tell me where i should ask in the stackexchange.com . – bronze man Oct 30 '19 at 08:35
  • welcome to U&L, general question (such as this one) about ubuntu are fine here, very detailed question (location of depot for instance) can go to AskUbuntu site. however provided solution will work on any unix that support ssh, so it is fine here. – Archemar Oct 30 '19 at 08:41
  • @Archemar sorry ,but AskUbuntu do not accept ubuntu1404 right now. I have tried. https://askubuntu.com/questions/1184330/how-to-enable-ssh-root-access-with-password-on-ubuntu-14-04/1184331#1184331 – bronze man Oct 30 '19 at 11:49
  • Well, sorry to hear it. As I said, your answer will work on many unix+ssh configuration, if not all. – Archemar Oct 30 '19 at 12:56

1 Answers1

1

Warning: Make sure the new SSH port does not conflict with any known or blocked ports.

To Change the SSH Port for Your Linux Server

Connect to your server via SSH.

Switch to the root user.

Run the following command:

vim /etc/ssh/sshd_config

Locate the following line:

# Port 22

Remove # and change 22 to your desired port number.

Restart the sshd service by running the following command:

service ssh restart

reference (change to work on ubuntu 1404): https://hk.godaddy.com/en/help/changing-the-ssh-port-for-your-linux-server-7306