How to configure SSH access through Webmin

3 years ago 407

Looking for an easier mode to configure SSH connected your information halfway servers? How astir Webmin? Jack Wallen walks you done immoderate of the options for amended SSH information utilizing this web-based GUI.

webminhero.jpg

Nearly each Linux server I administer is done via SSH. Given that I've been moving with Linux for implicit 20 years, configuring SSH with an oculus connected information is beauteous elemental for me. But astir often I'm doing this connected smaller deployments, wherever determination mightiness lone beryllium a fistful of users that person to summation entree to the server. With these machines, I thin to instrumentality attraction of the SSH configuration manually (as successful editing the ssh_config and sshd_config files via a substance editor).

SEE: Security incidental effect policy (TechRepublic Premium)

But what if you're moving with larger deployments successful information centers? You astir apt don't privation to person to instrumentality attraction of those configurations utilizing nano oregon vi. And if you already person Webmin deployed, you person the means to marque those configuration changes considerably easier. 

Let maine amusement you how.

What you'll need

To marque this work, you'll request Webmin installed connected your organisation of choice. I've already covered however to instal Webmin connected Ubuntu and Rocky Linux. Give those articles a work to get Webmin up and moving connected your server organisation of choice. Once you person Webmin up and running, you're each acceptable to configure SSH.

How to configure SSH via Webmin

Log into Webmin and past click the Webmin tab and past grow the Servers introduction (Figure A).

Figure A

webminssha.jpg

The SSH introduction successful Webmin is recovered nether Servers successful the Webmin tab.

In the SSH conception (Figure B), click Authentication.

Figure B

webminsshb.jpg

The assorted SSH options are disposable for configuration successful Webmin.

The archetypal happening you'll bash is prime No for Allow Login by Root (Figure C). Once you've done that, click Save. If you program to acceptable up SSH cardinal authentication, you'll privation to permission Allow Authentication by Password acceptable to Yes until you get your cardinal authentication acceptable up for each users that distant into that server.

Figure C

webminsshc.jpg

Configure SSH to disallow basal idiosyncratic login.

Click Return to Module Index and past click Access Control. In this model (Figure D), you tin configure which users and groups are allowed to entree the server via SSH.

Figure C

webminsshc.jpg

Limiting SSH entree to either users oregon groups.

If you opt to spell the radical route, you'll request to archetypal make the caller radical and adhd users to the caller group. This is each taken attraction of successful System | Users, and Groups. Say, for instance, you've created a caller radical called editorial and added the indispensable users. Once you've done that, spell backmost to the SSH Access Control, click the cheque container to the close of All (associated with Only Allow Members of Groups), and past benignant editorial successful the substance field. Click Save and spell backmost to the Module index. Once successful the index, click Apply Changes. At this point, you've constricted SSH entree to lone the users successful that group. Just marque definite to trial the caller configuration earlier you bash thing else.

Next, you mightiness see configuring SSH to usage a non-standard port. For that, click connected the Networking enactment successful the Webmin SSH config window. Here (Figure E), you tin alteration the default larboard from 22 to immoderate you'd alternatively use. 

Figure D

webminsshd.jpg

Configure SSH to usage a non-standard port.

Once you've changed the port, marque definite to click Save and past click Apply Changes successful the module index. One happening to consider, however, is if you're moving connected a Linux organisation that employs SELinux, you'll request to pass the information strategy of the alteration to the caller port. Out of the box, Webmin doesn't see an SELinux module, truthful you'd request to instrumentality attraction of that manually with a bid like:

sudo semanage larboard -a -t ssh_port_t -p tcp 2112

Once you've done that, SSH tin beryllium accessed similar so:

ssh 192.168.1.169 -p 2112

And that's however you tin much easy configure SSH utilizing the Webmin GUI. When you person a ample information halfway filled with Linux servers, this is the much businesslike (and easier) mode to go.

Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.

Cybersecurity Insider Newsletter

Strengthen your organization's IT information defenses by keeping abreast of the latest cybersecurity news, solutions, and champion practices. Delivered Tuesdays and Thursdays

Sign up today

Also spot

Read Entire Article