10 ways to improve SSH security in your production environment!

Source: Internet
Author: User

Reason:

A friend is a game, he told me that their company about SSH security has five layers of verification! Well, maybe for some of the less security-conscious ops, what's so complicated? Even some companies have direct root login, and even some SSH default ports are not changed. I personally think that not necessarily safe to do so much, (of course, according to the specific circumstances of the company's business specific) but at least some basic security aspects to do bit!

Here are some of my personal summary, share to everyone!


Common Security-related measures:

1, hard firewall.

The hardware firewall ACL policy also determines whether a host can be accessed

2. Soft Firewall

such as iptables,tcpwrappers, protection software, etc., internal to the host further restrictions

3. Modify the default SSH port

The default is 22, and it is recommended to change to five bits.

4, password to meet complexity requirements, to prevent violent cracking

Avoid SSH brute force hack, suggest password slightly more complex, accord with three-fourths principle!

5. No root Login

Disable root remote SSH login

In/etc/ssh/sshd_config settings: Permitrootlogin No:

Disable root native login (this is not necessary depending on the environment)

 auth Required pam_succeed_if.so User! = root quiet

Add to the first line of the/etc/pam.d/login file

6. Prohibit Password login

Delete unnecessary accounts and disable user password login

7, public key private key authentication

rsa2048 with the public key and set the complexity password

8, LDAP and other ways of unified authentication Login

Improve security by centralizing management of SSH accounts

9, log cutting to secure log, through the script, for unsafe access to the IP filter and alarm

The secure log logs information about a user's remote login, which can be checked for security reasons by looking at this log.

10. Build a log server to monitor the secure log. Troubleshoot unsafe factors

A good log server, can greatly reduce the work of administrators, and easy to manage.

。。。。。。


Summarize:


Above is just a few people in the production environment encountered some problems and personal summary, of course, there are many ways to improve their security, according to their own architectural environment, choose the right security is the King!


If you have any questions, you can contact the author!

This article comes from "? Only! "Blog, be sure to keep this provenance http://renzhiyuan.blog.51cto.com/10433137/1789129

10 ways to improve SSH security in your production environment!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.