Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jayarmstrong on github.
  • I am jayarmstrong (https://keybase.io/jayarmstrong) on keybase.
  • I have a public key ASAN9VKysku_HSMjeGKJvttxx0m7sW5Sfix_PJSDCcnbHwo

To claim this, I am signing this object:

@jayarmstrong
jayarmstrong / harden-ssh.sh
Created January 18, 2019 08:21 — forked from navin-mohan/harden-ssh.sh
A script to harden openSSH on ubuntu or debian server
#!/bin/bash
# Script to harden ssh on ubuntu/debian server
# follow on my blog http://www.coderew.com/hardening_ssh_on_remote_ubuntu_debian_server/
# checkout the repo for more scripts https://github.com/nvnmo/handy-scripts
read -p "Enter your server IP:" serverIP # prompt for server IP
read -p "Enter your username(requires root privileges):" username # prompt for username
printf "\nChanging the default SSH port is one of the easiest\n things you can do to help harden you servers security. \nIt will protect you from robots that are programmed \nto scan for port 22 openings, and commence \ntheir attack."
printf "\n"
read -p "Do you want to change default SSH port?[Y/n]" -n 1 portChange