Code Monkey home page Code Monkey logo

ansible-role-openssh's Introduction

Ansible role: openssh

main Build status

Install and configure an OpenSSH server.

Highly inspired by:

Requirements

None

Role Variables

These variables are defined in defaults/main.yml:

openssh_configuration: {}

openssh_configuration_match_blocks: {}

Dependencies

None

Example Playbook

- name: Converge
  hosts: all
  roles:
    - role: ansible-role-openssh
      vars:
        openssh_configuration:
          #Include: /etc/ssh/sshd_config.d/*.conf
          ## Configuration
          Port: 22
          ListenAddress:
            - "0.0.0.0"
            - "::"
          AcceptEnv:
            - LANG
            - LANGUAGE
            - LC_*
          PrintMotd: no
          Subsystem: sftp  /usr/lib/openssh/sftp-server
          UsePAM: yes
          ## Ciphers
          Ciphers: aes128-ctr,aes192-ctr,aes256-ctr
          HostKeyAlgorithms: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss
          KexAlgorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256
          MACs: hmac-sha2-256,hmac-sha2-512,hmac-sha1
          ## Security
          # Protocol: 2
          PasswordAuthentication: no
          PermitRootLogin: no
          PermitEmptyPasswords: no
          AllowTcpForwarding: no
          AllowStreamLocalForwarding: no
          GatewayPorts: no
          PermitTunnel: no
          ChallengeResponseAuthentication: no
          ClientAliveInterval: 180
          MaxAuthTries: 5
          X11Forwarding: no
        openssh_configuration_match_blocks:
          Address 192.168.1.*:
            PasswordAuthentication: "yes"
            PermitRootLogin: "yes"

License

MIT

Author Information

Tibor Csóka

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.