Posted: . At: 8:53 AM. This was 4 years ago. Post ID: 14540
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Easily change files on your Linux system with a simple command.


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.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.