How to configure SSH via Webmin?

From LHYcloud Docs
Jump to navigation Jump to search

Here are few steps which describes how to configure SSH via Webmin

  • Log into Webmin and then click the Webmin tab and then expand the Servers entry                              
Picture1.jpg


The SSH entry in Webmin is found under Servers in the Webmin tab.

  • In the SSH section, click Authentication.
Picture12.jpg

The various SSH options are available for configuration in Webmin.

  • The first thing you’ll do is select No for Allow Login by Root . Once you’ve done that, click Save. If you plan to set up SSH key authentication, you’ll want to leave Allow Authentication by Password set to Yes until you get your key authentication set up for all users that remote into that server.
Picture13.jpg


Configure SSH to disallow root user login.

  • Click Return to Module Index and then click Access Control. In this window, you can configure which users and groups are allowed to access the server via SSH.
Picture14.jpg


Limiting SSH access to either users or groups.

  • Next, you might consider configuring SSH to use a non-standard port. For that, click on the Networking option in the Webmin SSH config window. Here, you can change the default port from 22 to whatever you’d rather use.
Picture15.jpg



Configure SSH to use a non-standard port.

  • Once you’ve changed the port, make sure to click Save and then click Apply Changes in the module index. One thing to consider, however, is if you’re working on a Linux distribution that employs SELinux, you’ll need to inform the security system of the change to the new port. Out of the box, Webmin doesn’t include an SELinux module, so you’d need to take care of that manually with a command like:
sudo semanage port -a -t ssh_port_t -p tcp 2112
  • Once you’ve done that, SSH can be accessed like so:
ssh 192.168.1.169 -p 2112


And that’s how you can more easily configure SSH using the Webmin GUI. When you have a large data center filled with Linux servers, this is the more efficient (and easier) way to go.