guide for setting up a centos gateway machine

Issues related to configuring your network
goudeuk
Posts: 27
Joined: 2013/09/02 11:46:50
Location: London

guide for setting up a centos gateway machine

Postby goudeuk » 2017/08/16 16:28:37

Hello everyone

I would like to find out how to setup a gateway machine on Centos 7 for people outside our college to be able to ssh into the gateway machine and from there, ssh to their linux workstation. Could someone please direct me to a good How-To guide/documentation? This is something I have never done before so if you have any advice/suggestion please let me know.

Thank you

hunter86_bg
Posts: 811
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: guide for setting up a centos gateway machine

Postby hunter86_bg » 2017/08/16 20:20:48

SSH is enabled by default and listening on port 22. It is wiser , to keep the machine up to date, SELinux in enforcing mode and with "PermitRootLogin=no" in "/etc/ssh/sshd_config".
To verify your ssh settings - you can use

Code: Select all

sshd -t

User avatar
TrevorH
Forum Moderator
Posts: 21206
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: guide for setting up a centos gateway machine

Postby TrevorH » 2017/08/16 20:37:23

It's also wise to disable password authentication and allow access only to people who have ssh public/private key pairs. Some people may recommend moving the ssh daemon to a non-standard port but that isn't really any more secure - it just cuts down on noise in the logs. If you do move it, it's best to choose another port < 1024 so that only root can bind to it. That may also need you to tell selinux that sshd can use the new port. Personally I just stick with 22 and ignore the log noise. Anyone competent will find the new ssh port in minutes anyway.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke