How to test ssh connection using bash script in Linux

How to test ssh connection using bash script in Linux

There can be multiple scenarios due to which ssh connection may fail, some of them can be network issues password incorrect passphrase incorrect and many more.. so we will try to rule out all the possible failed scenarios with some pre-checks before we do the actual task to make sure my ssh doesn't get hang ... Read more How to test ssh connection using bash script in Linux

How to disable or restrict direct root login via console or ssh

Below article is a must read to harden your existing sshd configuration file Best practices to harden and increase security with ssh (ciphers, MACs etc) By default root user had direct login access to the Linux machine which can be dangerous and in most organisation it is restricted But how do we restrict a direct ... Read more How to disable or restrict direct root login via console or ssh

How to configure Password-less authentication from Windows to Linux using Putty

How to configure Password-less authentication from Windows to Linux using Putty

I have already written few articles to configure passwordless authentication between two Linux servers, here in this article I will share the steps to configure password less login from Windows to Linux box using Putty My setup: ========================== Windows Box: 192.168.1.2 Linux Box: 192.168.1.5 ========================== You can download and install Putty from their official page ... Read more How to configure Password-less authentication from Windows to Linux using Putty

Best practices to harden and increase security with ssh (ciphers, MACs etc)

In my another article I have shared the steps to configure SSH port forwarding and tunnelling in Linux Below are some of the selected arguments which can be used in sshd_config to harden the ssh based security. There can be many more such arguments which you can find from man page of sshd_config HostKey A ... Read more Best practices to harden and increase security with ssh (ciphers, MACs etc)

How to fix "Postponed keyboard-interactive for invalid user from port ssh2 [preauth]"

The other day I was unable to perform a passwordless (passphrase) based authentication for one of my user and for every attempt I was getting the below error Error: Postponed keyboard-interactive for invalid user deepak from 192.169.32.11 port 59754 ssh2 [preauth] Solution: There can be actually multiple reasons for this. The user really does not ... Read more How to fix "Postponed keyboard-interactive for invalid user from port ssh2 [preauth]"