How to block users having OpenSSH key login

For security reasons many server administrators are preferring OpenSSH key login to their servers. Generally for OpenSSH key login we are using authorized_keys file. By appending keys to this file we will able to ssh a server. The default location of the authorized_keys file is ~/.ssh/authorized_keys. To find and print all authorized_keys file from your […]
Continue reading…

 

Setup Automatic Users Logout After a Period of Inactivity

Below script will implement a 5 minute idle time-out for the default /bin/bash shell. Step 1: Create file autologut.sh

Append the following code:

Step 2: Save and close the file. Set permissions:

*For tcsh version follow the below process Step 1: Create file autologut.sh

Append the following code:

Step 2: […]
Continue reading…

 

How to disable password authentication and Create login alert in Linux

Small tips for securing a server with from SSH login 1. Disable Password Login Edit /etc/ssh/sshd_config and set the following

Now you can only login via ssh keys. Generate your local keys using below command

Copy thee id_rsa.pub key to the remote server to where you want to ssh.

Then appened your […]
Continue reading…