sshd

paid - developer - shariful islam

Supported Version : v1.0.2

This module will help you perform 50+ security checks and ensure security on the remote SSH server. Here is the added cryptography algorithm. Also, this module helps you hardening ssh configuration and prevent attacks on your server.

YAML Config

---
opsshell:
  - name: Task 1 on All Servers
    hosts: <host group name>
    tasks:
      - name: ssh server config with security
        sshd:
          configure:
            port: "22"
            disable_root_login: False
            security: True
            authentication: password
            allow_login_user:
              - sharif
              - root
              - test@192.168.2.111
            allow_login_group:
              - allowgroup
  • - name: This is the name of the Opsshell task. It's used for documentation purposes and helps you understand what the task does.

  • sshd: This refers to the sshd Opsshell module, which is used for configuring the SSH server.

    • configure: This is a section where you specify the SSH server configuration settings.

      • port: "22": This sets the SSH server port to 22, which is the default SSH port.

      • disable_root_login: False: It indicates that root login is not disabled, allowing the root user to log in. False and True

      • security: True: This appears to enable some security-related settings on the SSH server. The exact settings impacted by this might depend on your system's SSH server configuration. False and True

      • authentication: password: This suggests that password-based authentication is enabled. This means users can log in using a username and password. allow: password, hostkey, pem. hostkey is allow only ed25519.

      • allow_login_user: Lists the users who are allowed to log in. In this case, it allows login for "sharif," "root," and "test@192.168.2.111." The format "user@remotehost" can be used to specify remote hosts where the user is allowed to log in.

      • allow_login_group: Specifies the groups that are allowed to log in. In this case, it allows login for the "allowgroupname."

Output

Last updated

Was this helpful?