How to use parallel ssh (PSSH) for executing ssh in parallel on a number of Linux/Unix/BSD servers

Posted on in Categories Cloud Computing, Command Line Hacks, Howto last updated April 21, 2017

Recently I come across a nice little nifty tool called pssh to run a single command on multiple Linux / UNIX / BSD servers. You can easily increase your productivy with this SSH tool.

More about pssh

pssh is a command line tool for executing ssh in parallel on some hosts. It provides specialties includes:

  1. Sending input to all of the processes
  2. Inputting a password to ssh
  3. Saving output to files
  4. IT/sysadmin taks automation such as patching servers
  5. Timing out and more

Let us see how to install and use pssh on Linux and Unix-like system.

pssh-welcome

How to protects Linux and Unix machines from accidental shutdowns/reboots with molly-guard

Posted on in Categories Command Line Hacks, Debian Linux, Hardware last updated February 19, 2017

Oops! I did it again. I thought I was logged into my home server. Turns out I rebooted the db server. Another my not so favorite is typing “shutdown -h 0” into the wrong terminal. I know a few people who have admitted to doing that here.

My anger that can't be contained
Is there any end to the madness? Do I need to suffer from accidentally random reboots and shutdowns? After all, it is human nature to make mistakes, but one should not keep on making the same mistakes again and again.

How to use CoreFreq CPU monitoring software on Linux

Posted on in Categories Hardware, Open Source last updated February 8, 2017

Recently I came across an excellent software called CoreFreq. It is a CPU monitoring software designed for 64-bits Processors w/ architectures Intel Atom, Core2, Nehalem, SandyBridge and superior, and AMD Family 0F. It runs on 64 bit Linux system. CoreFreq provides a framework to retrieve CPU data with a high degree of precision:

How to speed up OpenSSL/GnuPG Entropy For Random Number Generation On Linux

Posted on in Categories Howto, Open Source, Security last updated November 7, 2016

Entropy is nothing but the measure of “randomness” in a sequence of bits. The PRNG ( pseudorandom number generator ) is a special device (e.g. /dev/random on Linux) to create randomness from server hardware activities. It uses interrupts generated from the keyboard, hard disk, mouse, network and other sources. The random number generator gathers environmental noise from device drivers and other sources into an entropy pool. The randomness usually used for security purposes like creating TLS/SSL keys and the quality source of random bits is critical. For example, OpenSSL APIs can use quality randomness to make your program cryptographically secure. However, a poor source of randomness could result in loss of security. In this post, I will cover haveged and rng-utils/rng-tools to generate random numbers and feed linux random device for your virtual or dedicated Linux server.