This command will change the default port for the SSH server on your Linux machine.
jason@jason-desktop:~$ perl -pi -e 's/^#?Port 22$/Port 443/' /etc/ssh/sshd_config |
Then run this command to restart the SSH server.
jason@jason-desktop:~$ sudo service ssh restart |
This will work very well. This is how to change the port for the SSH server using a simple command as the superuser.
This is how to change the banner setting to enable a banner that will display when you log in to the SSH server. create a file named “legal” and put this in the /etc/ssh/ directory.
jason@jason-desktop:~$ sudo perl -pi -e "s/^#?Banner none$/Banner /etc/ssh/info/" /etc/ssh/sshd_config |
And then put a suitable message in the banner to dissuade anyone from abusing the computer privileges afforded to them by the computer administrator.