GithubHelp home page GithubHelp logo

rhel-ssh-configurator's Introduction

OpenSSH-Server Configuration for RHEL

author: Olivier Hayot
creation date: 12/07/2022

This project auto configure an openssh-server on a RHEL based linux system.
Please adapt the values stored in the script.sh file before executing it, you can customize the user and the port.

How to use

There are 2 different files in the folder:

  • script.sh: You need to execute it, it will configure the ssh config file. You can specify the port and the user inside.
  • ssh-key.pub: This file contains your ssh public key(s)

You can launch the script file with the following command:

    sudo bash script.sh

What about the firewall

I made the choice to not configure in the script the firewall to let the user set it as it wants.
As this script is for a RHEL distro i suggest you these two different way to do it

By using Firewalld

If you are using firewalld you can use the following commands:

    firewall-cmd --add-port=<PORT>/tcp --permanent
    firewall-cmd --reload

You can also specify a specific zone in the command if you want.
Please ensure that firewall-cmd is enabled or is started before executing these commands.

By using iptables

If uou are using iptables you can use the following commands:

    iptables -A INPUT -p TCP --dport 22 -j ACCEPT
    iptables -A OUTPUT -p TCP --sport 22 -j ACCEPT

Feel free to customize it as you want.
If you want it to be added in you firewall config, add it to the service launched at the start of the service

rhel-ssh-configurator's People

Contributors

h0livier avatar

Watchers

 avatar

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.