CentOS 7 - Disable Root Login

#!/bin/bash SEARCH="#PermitRootLogin yes" REPLACE="PermitRootLogin no" FILEPATH="/etc/ssh/sshd_config" sudo sed -i "s;$SEARCH;$REPLACE;" $FILEPATH sudo service sshd restart The script is exactly the same for debian users, except the last line in which you need to change sshd to ssh…

Read this article

Managing Encryption Keys (ssh/ssl)

Decrypting a Key If you want to decrypt your SSH key, run the following command: openssl rsa -in \ [existing name] \ -out \ [new unencrypted file name] Encrypting a Key If you want to encrypt your currently non-encrypted key, then run the following command instead: aes256 openssl rsa -aes256 \ -in [existing name]…

Read this article

Ubuntu - SSH Two Factor Authentication

Let me start by saying that security is a mindset, not an application. The best way to secure one's systems is to configure as many layers of security as possible and be careful with one's credentials. No single system or application will guarantee complete protection, but setting up many barriers…

Read this article