Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OK, recently I had to open my firewall a bit to allow more SSH connectivity. SO along with that I beefed up my SSH security. Mandatory PKI being one of them. I was wondering if any of you had some more ideas to make my SSH server more secure, hopefully without adding frustration. But thats more of my
decision. Here's my sshd_config file:
Looking at the sshd_config man page I'd recommend:
Quote:
Port 22
AllowGroups users
AllowTcpForwarding no
AllowUsers markus
AuthorizedKeysFile .ssh/authorized_keys
Banner /etc/motd
ChallengeResponseAuthentication no
Ciphers blowfish-cbc
ClientAliveInterval 15
ClientAliveCountMax 4
Compression yes
GatewayPorts no
HostbasedAuthentication no
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
IgnoreRhosts yes
IgnoreUserKnownHosts yes
KeepAlive no
KerberosAuthentication no
KeyRegenerationInterval 900
ListenAddress xxx.xxx.xxx.xxx:22
LoginGraceTime 15
LogLevel INFO
MaxStartups 5:50:100
PAMAuthenticationViaKbdInt no
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin no
PermitUserEnvironment no
PrintLastLog no
PrintMotd no
Protocol 2
PubkeyAuthentication no
RhostsAuthentication no
RSAAuthentication no
ServerKeyBits 1024
StrictModes yes
Subsystem sftp /usr/libexec/openssh/sftp-server
SyslogFacility AUTHPRIV
UseLogin no
UsePrivilegeSeparation yes
VerifyReverseMapping yes
X11Forwarding no
As a side note I'd recommend using latest OpenSSH which is at this time 3.5
Last edited by markus1982; 11-09-2002 at 02:38 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.