GithubHelp home page GithubHelp logo

secure-ssh's Introduction

Script for Secure SSH

Secure SSH configuring:

  • Random port generator or custom port setup or you can set static port number with (-p)
  • Disable passwords or allow passwords with (-a)
  • Yes/No permit root settings (-r)
  • Allow port to internal Firewalld zone (-i)
  • Disable X11 forwarding
  • Secure protocol settings
  • Session intervals
  • Backup previous sshd_config

Please use this script after clean install system CentOS / Fedora / Debian . Tested and using on CentOS / Fedora / Debian 11

Note: Script disable PasswordAuthentication, before script usage, setup key authentication (one more link) please.

Usage

Custom ssh port and add custom port to internal firewalld zone:

/secure-ssh.sh -p 1234 -i

Allow root ssh (script default: root logon will disable) logon:

./secure-ssh.sh -r

Defaults

  • PermitRootLogin no
  • PermitEmptyPasswords no
  • PasswordAuthentication no
  • ClientAliveInterval 60
  • ClientAliveCountMax 60
  • X11Forwarding no
  • Protocol 2
  • Random generated port number between range: 40000-50000

Also script show finally message with created parameters:

Host <detected host name>
   HostName <detected host IP address>
   port <generated port number>

secure-ssh's People

Contributors

m0zgen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

secure-ssh's Issues

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.