Thursday, April 27, 2017

[Backup}: Backup Your Entire Linux System Using Rsync

Backup Your Entire Linux System Using Rsync


Today, I wanted to reinstall one of my virtual machine which is running with Ubuntu 16.04 LTS server. Before reinstalling, I tried to backup the entire system. While searching for an easiest way to do this, I found a plausible solution in Arch Linux wiki page. I never thought that it was going to be that much simple. I copied my entire root / tree with Rsync in a single line command. Yes, it is just a one line command. While there there so many tools to backup your systems, I find this method is much easier and convenient, at least to me. Also, this method is better than disk cloning with dd command. Because It doesn’t matter if your hard drive is different size, or use different filesystem. This method will work in all cases.
In this brief tutorial, I will explain how to backup your entire Linux system using Rsync utility.
First, insert your backup medium (Pend drive or External hard disk). Then find the drive letter using ‘fdisk -l’ command. In my case, my Pen drive id is /dev/sdb1. Mount your drive to any location of your choice.
sudo mount /dev/sdb1 /mnt
To backup the entire system, all you have to do is open your Terminal and run the following command as root user:
sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt
This command will backup the entire / directory, excluding /dev, /proc, /sys, /tmp, /run, /mnt, /media, /lost+found directories.
Let us break down the above command and see what each argument does.
  • rsync – A fast, versatile, local and remote file-copying utility
  • -aAXv – The files are transferred in “archive” mode, which ensures that symbolic links, devices, permissions, ownerships, modification times, ACLs, and extended attributes are preserved.
  • / – Source directory
  • –exclude – Excludes the given directories from backup.
  • /mnt – It is the backup destination folder.
Please be mindful that you must exclude the destination directory, if it exists in the local system. It will avoid the an infinite loop.

To restore the backup, just reverse the source and destination paths in the above command.
Please be mindful that this is suitable for local and stand-alone systems only. If your system is being actively accessed by some other systems on the network, it isn’t better solution. Because, the contents of these systems might be constantly updated every minute, and some files may change during the rsync process. Say for example, when rsync will reach the file 2, the contents of the previous file (File 1) might be changed. This will leave you with a dependency error when you will need to use that backup. In such cases, a snapshot-based backup is the better approach. Because the system will get “froze” before the backup process starts and get it “unfreeze” when the backup process finishes, so all the files are consistent.
And, that’s all. Hope this helps. If you find our guides useful, please share them on your social, professional networks, so that other users can also benefit from them. We will be keep posting more good stuffs everyday. Stay tuned with us to read awesome stuffs.
Cheers!
Source:

Tuesday, April 25, 2017

[Quick Tips]: Auto Shutdown, Reboot, Suspend, Hibernate Your Linux System At A Specific Time

Auto Shutdown, Reboot, Suspend, Hibernate Your Linux System At A Specific Time

Method 1 – Using Autopoweroff

Autopoweroff is simple, yet useful utility that can be used to poweroff, reboot, suspend, hibernate your system, or run any custom command provided by the user at a specific time. On good thing about Autopoweroff is it will shutdown the system only when certain conditions are met. If the system we intended to shutdown is being accessed/used by another system, it won’t shutdown. Let us say you have set shutdown time at 12:00am, but some other systems on your network are still accessing it after 12:00am, then it will not shutdown. It will wait for the other systems to complete their work, and shutdown itself only if no other computer on the network is responding to ping. Sounds pretty good, isn’t it?
Your system will shutdown, suspend, or hibernate when the following conditions are met:
  • Any hosts that the computer is dependant on is not answering ping anymore.
  • No keyboard or mouse activity has been detected on the computer for a while.
  • The user has not disabled Autopoweroff.
Autompoweroff should work on any modern Linux operating systems, and is free and open source. So, anyone can fork, improve the code, or add any additional features they want.
Download the latest Autopoweroff installer file for your distribution. Currently, .deb, and .rpm packages are available.
As I use Ubuntu, I downloaded the .deb file.
wget https://github.com/deragon/autopoweroff/releases/download/3.0.0/autopoweroff-3.0.0-1.noarch.deb
Then, install it using commands:
sudo dpkg -i autopoweroff-3.0.0-1.noarch.deb
sudo apt-get install -f
Configuration
Once installed, open GUI configuration tool or /etc/autopoweroff.conf file and edit to your particular needs.
Here, let us follow the GUI method. Open up Autopoweroff GUI configuration tool either from the the Menu or Unity dash.
This is how Autopoweroff configuration window looks like.
As you can see in the above screenshot, Autopoweroff utility has two sections namely Status & Commands, and Configuration. In Status & Commands section, you can enable or disable the options such as auto shutdown, suspend, reboot, and hibernate.
In Configuration section, you can set the time to run a particular action at a specific time.
The configuration section has further split into three columns. In the first column, you can define the period and timeouts settings.
  • Start hour – Start hour of the ‘no action’ interval. Autopoweroff will run the action such as poweroff, suspend, reboot, hibernate or other only outside the (Start hour, End hour) interval.
  • End hour – End hour of the ‘no action’ interval. Autopoweroff will run the action such as poweroff, suspend, reboot, hibernate or other only outside the (Start hour, End hour) interval.
  • Idle time – It is the time required by Autopoweroff to wait for idle user interactively (keyboard, mouse, joystick… etc) before proceeding to any action. Thus if Autopoweroff finds itself outside the ‘no action’ interval, the action would still not be executed as long as there is user activity on the computer + ‘idle time’ delay.
  • Boot delay – It is the minimum delay that Autopoweroff must wait before running any action if Autopoweroff was started during a shutdown interval. This prevents accidental shutdown to occur if Autopoweroff was unexpectedly started; it gives time for users to kill Autopoweroff.
In second column, you can add, remove, or edit dependant systems with their hostname or ip address. In third column, you can select the actions that needs to be performed at a specific time. Your system will poweroff, sleep, hibernate, or execute any custom command based on the inputs you’ve given in the Configuration section. You need to be careful in this section. Any misconfigured settings will cost you data loss or unwanted/unexpected shutdown or reboot.
Once you made the changes, click Save to apply the changes. You can undo the changes by clicking the Revert button. To close this utility, simply press Quit button.
For more details, refer Autopoweroff GitHub page.

Method 2 – Using qshutdown

qshutdown is yet another useful utility to auto shutdown, reboot, suspend, and hibernate your system at a specific time. It works well on Ubuntu, Linux Mint and other Ubuntu variants such as Kubuntu, Xubuntu, Lubuntu, etc.
To install it on Ubuntu and its derivatives, run the following commands one bey one in your Terminal:
sudo add-apt-repository ppa:hakaishi/qshutdown
sudo apt update
sudo apt install qshutdown
Once installed, launch it either from Unity dash or Menu.
This is how qshutdown interface looks like in my Ubuntu 16.04 LTS desktop.
As you can see in the above screenhsot, qshutdown hasn’t much options. There are only few settings. If you want to perform any action (shutdown/reboot/suspend/hibernate) in your system in 60 minutes from now, just choose “Minutes till shutdown” option and enter the time. Then, click OK.
Once you hit the OK button, the countdown time will start, and the selected action will be performed at the exact time.
If you want to show the warnings before the selected action takes place, check the box that says “Warnings on”.
To schedule your action at a specific time, choose “Shutdown-time” and enter the exact time to perform the selected action.
As you see in above screenshot, I want my system to shutdown itself at 4:40pm. You are free to choose any other action of your liking.
Another good thing is we can schedule the actions weekly. To do so, click Calendar, and go to Weekly option. There you can choose action you want to perform on a specific day of the week.
qshutdown is very simple, yet fully functional and useful utility. Unlike Autopoweroff, qshutdown will shutdown, suspend, hibernate your system as soon as it reached the deadline, even if one of your other systems are accessing it. So, you must be very very careful while doing any remote jobs.
For more details, refer qshutdown launchpad page.
And, that’s all. Hope these two utilities helps you in one way or another. These kind of utilities will quite be useful for those who want to work with the computer only for a certain time.

[Quick Tips]: How To Add Linux Commands To The Queue And Execute Them One By One

How To Add Linux Commands To The Queue And Execute Them One By One

Today, I came across a coolest Linux command line utility called “Task Spooler”. As the name implies, Task spooler is a Unix batch system that can be used to add the Linux commands to the queue and execute them one after the other in numerical order (ascending order, to be precise). Please do not confuse it with ‘at’ command, which is used to execute Linux commands at a specified time. Unlike at command, Task spooler runs a command immediately from the queue as soon as the previous command is finished.
This can be very useful when you have to run a lots of commands, but you don’t want to waste time waiting for one command to finish and run the next command. You can queue it all up and Task Spooler will execute them one by one. In the mean time, you can do other activities. Each user in each system has his/her own job queue. It is also very useful when you know that your commands depend on a lot of RAM, a lot of disk use, give a lot of output, or for whatever reason it’s better not to run them at the same time. In a nutshell, Task Spooler is a command line program to queue up other commands for batch execution.

In this brief tutorial, let me show you how to install and use Task Spooler in Unix-like operating systems.

Add Linux Commands To The Queue And Execute Them One By One Using Task Spooler

Installing Task Spooler

On Debian, Ubuntu, Linux Mint:
Task Spooler is available in the default repositories of Debian, Ubuntu and other DEB based systems. So, you can install it using command:
sudo apt-get install task-spooler
For other systems, you can download the Task Spooler source file from this link and build it as native package to the Linux distribution you use and install it as explained in any one of the following methods.

Usage

Let us see some practical examples. All examples provided here are tested in Ubuntu 16.04 LTS system.
Note: In Debian/Ubuntu Task Spooler can be executed with ‘tsp’ command, because there is an another program with same name called ts (Time Stamping Authority tool (client/server). For Linux distributions other than Ubuntu/Debian, you can run it using ‘ts’ command.
Run tsp command:
tsp
Right now, there is nothing in the queue. Allow me to add some commands to the queue. To do so, run:
tsp echo Welcome OSTechNix
tsp echo "Hello World"
Now, run tsp command again to view the commands in the queue:
tsp
Sample output:
ID State Output E-Level Times(r/u/s) Command [run=0/1]
0 finished /tmp/ts-out.jpHIG1 0 0.01/0.00/0.00 echo Welcome OSTechNix
1 finished /tmp/ts-out.8H6LLB 0 0.00/0.00/0.00 echo Hello World
As you see in the above output, each command has a unique ID in (0, 1, 2.. etc.) in ascending order. Also, it shows the current of state of commands (Eg. finished or running) in the queue. The echo commands are very simple and short, so we got the result as ‘finished’. Let us run a some command that takes more time to finish.
tsp find / -type f -printf '%T+ %p\n' | sort | head -n 20
This command will find and display the top 20 oldest files in the root (/) file system.
Sample output:
2
Now, run tsp command to view the list of commands in the queue.
tsp
Sample output:
ID State Output E-Level Times(r/u/s) Command [run=1/1]
2 running /tmp/ts-out.79rMXn find / -type f -printf %T+ %p\n
0 finished /tmp/ts-out.jpHIG1 0 0.01/0.00/0.00 echo Welcome OSTechNix
1 finished /tmp/ts-out.8H6LLB 0 0.00/0.00/0.00 echo Hello World
As you see in the above output, the command with ID 2 is running. Similarly, you can add as many as commands you want to run using Task Spooler.
To view the output of a running job to check what’s going on, enter the following command:
tsp -c 2
Here, 2 is the ID of running command. press CTRL+C to return back to the Terminal. it doesn’t cancel the running command. It will only taek you back to the Terminal. The job will still run on the back ground.
To clear all commands which are finished from the queue, run:
tsp -C
Here, C is capital. The above command will clear the last completed commands from the queue. It will not remove any running commands or the commands in the queue.
To remove commands from the queue, run it with job ID like below:
Also, you can remove a command (running, finished, queued up) by specifying the ID like below.
tsp -r 2
The above command will remove the command that has ID 2 from the queue.
Remember, you need to run Task Spooler in distributions other than Debian/Ubuntu using ts command.
For more details, refer the man pages.
man ts
Or,
man tsp

Conclusion

If you’re too lazy to wait for a command to complete, you can queue it all up using Task Spooler. It will execute commands from the queue one by one in ascending order. You can view the output of any running command using its ID at any time. It will not run all commands at once. Instead, it will run commands one after another. Task Spooler can be used for executing batch jobs.
And, that’s all for now. 

[Troubleshooting]: Important Logs to monitor to identify issues in the system

Important Logs to monitor to identify issues in the system

An important part of System Administration is make sure that all the infrastructure is always up & working fine and if problems do arise on the servers, then to resolve those problems. We use various logs generated on our systems to identify the problems occurred & then resolve the issues based on the findings from the logs.

In this tutorial, we are going to learn some of the logs that are created on the Linux machines & what they are used for.

/var/log/boot.log

It stores all the boot related messages & is helpful in identifying issues related to booting of the system. So all the issues related to boot failures, unexpected or unplanned shutdown or unplanned reboot of the system can diagnosed using the boot.log.

/var/log/secure (RHEL/CentOS) & /var/log/auth.log (Debian/ubuntu)

Both files i.e. secure for RHEL & auth.log for Debian, serves same purpose. They are used to store all the events related to authentication. So if you are trying to locate an issue that’s related to authorization of the users, these are log files to look out for. Both these files can be used to investigate failed login attempts either directly to server or via ssh, also can be used for checking brute-force attempts & can these files also logs all the successful login attempts.

/var/log/faillog

Logs all the failed attempts for login to the system. This is another important file that can help us track security breaches or brute force attacks.

/var/log /dmesg

If you suspect any issues created by hardware, then this should be the first file that you look for. This log file is useful to diagnose any issue created by a hardware part or a driver for the hardware.

/var/log/messages (RHRL/CentOS) & /var/log/syslog (Ubuntu/Debian)

Both these files for their respective operating systems, contain all the non-critical & informational messages. These files can be used to track non-kernel boot errors or application related issues. This should be the first file to check, in case you are facing any of the above mentioned errors.

/var/log/daemon.log

Contains information related to various background daemons that runs in the background of our system. Though required very less but can help in diagnosing issues created by daemons.

/var/log/kern.log

Kern.log logs all the kernel related messages & contains all the information related to kernel. Helps us troubleshoot the warnings or errors generated by kernel, can also be used to diagnose connectivity & hardware issues.

/var/log/setroubleshoot

If you have SElinux enabled (we should keep it enabled), than this log file helps us track all the issues related to security context of the files.
(Recommended Read : SELinux for Beginners)

/var/log/yum.log

Yum.log has all the information related to software installations on your server. You can check it to make sure that the packages are properly installed or not, or if a installed package is behaving in unusual manner then use yum.log to diagnose the issue.

/var/log/mail.log /var/log/maillog

All the messages related to mail are stored in these files. It contains all the information for mails sent or received, failed & successful delivery reports, spamming attempt etc. So any issue arising out of sending or receiving of mails can be diagnosed with these files.

/var/log/cron.log

This log files lists all the messages created upon execution of scheduled cron job, whether they are successful messages or the error for the cron job.
These were some of the important log files that you must be monitoring to make sure that system is working properly. 

Wednesday, April 12, 2017

Copy: Pscp – Transfer/Copy Files to Multiple Linux Servers Using Single Shell

Pscp – Transfer/Copy Files to Multiple Linux Servers Using Single Shell

Pscp utility allows you to transfer/copy files to multiple remote Linux servers using single terminal with one single command, this tool is a part of Pssh (Parallel SSH Tools), which provides parallel versions of OpenSSH and other similar tools such as:
  1. pscp – is utility for copying files in parallel to a number of hosts.
  2. prsync – is a utility for efficiently copying files to multiple hosts in parallel.
  3. pnuke – it helps to kills processes on multiple remote hosts in parallel.
  4. pslurp – it helps to copy files from multiple remote hosts to a central host in parallel.
When working in a network environment where there are multiple hosts on the network, a System Administrator may find these tools listed above very useful.
Copy Files and Directories to Multiple Linux Servers
Pscp – Copy Files to Multiple Linux Servers
In this article, we shall look at some useful examples of Pscp utility to transfer/copy files to multiple Linux hosts on a network.
To use the pscp tool, you need to install the PSSH utility on your Linux system, for installation of PSSH you can read this article.
  1. How to Install Pssh Tool to Execute Commands on Multiple Linux Servers

Install PSSH or Parallel SSH on Linux

In this guide, we shall look at steps to install the latest version of PSSH (i.e. version 2.3.1) program on Fedora based distributions such as CentOS/RedHat and Debian derivatives such as Ubuntu/Mint using pip command.
The pip command is a small program (replacement of easy_install script) for installing and managing Python software packages index.

On Fedora based Distributions

On CentOS/RHEL distributions, you need to first install pip (i.e. python-pip) package under your system, in order to install PSSH program.
# yum install python-pip
On Fedora 21+, you need to run dnf command instead yum (dnf replaced yum).
# dnf install python-pip
Once you’ve install pip tool, you can install the pssh package with the help of pip command as shown.
# pip install pssh  
Sample Output
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pssh
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading pssh-2.3.1.tar.gz
Installing collected packages: pssh
Running setup.py install for pssh
Successfully installed pssh-2.3.1

On Debian Derivatives

On Debian based distributions it takes a minute to install pssh using pip command.
$ sudo apt-get install python-pip
$ sudo pip install pssh
Sample Output
Downloading/unpacking pssh
Downloading pssh-2.3.1.tar.gz
Running setup.py (path:/tmp/pip_build_root/pssh/setup.py) egg_info for package pssh
Installing collected packages: pssh
Running setup.py install for pssh
changing mode of build/scripts-2.7/pssh from 644 to 755
changing mode of build/scripts-2.7/pnuke from 644 to 755
changing mode of build/scripts-2.7/prsync from 644 to 755
changing mode of build/scripts-2.7/pslurp from 644 to 755
changing mode of build/scripts-2.7/pscp from 644 to 755
changing mode of build/scripts-2.7/pssh-askpass from 644 to 755
changing mode of /usr/local/bin/pscp to 755
changing mode of /usr/local/bin/pssh-askpass to 755
changing mode of /usr/local/bin/pssh to 755
changing mode of /usr/local/bin/prsync to 755
changing mode of /usr/local/bin/pnuke to 755
changing mode of /usr/local/bin/pslurp to 755
Successfully installed pssh
Cleaning up...
As you can see from the output above, the latest version of pssh is already installed on the system.

How do I Use pssh?

When using pssh you need to create a host file with the number of hosts along with IP address and port number that you need to connect to remote systems using pssh.
The lines in the host file are in the following form and can also include blank lines and comments.
pssh hosts file
192.168.0.10:22
192.168.0.11:22
Executing single command on multiple server using pssh
You can execute any single command on different or multiple Linux hosts on a network by running a pssh command. There are many options to use with pssh as described below:
We shall look at a few ways of executing commands on a number of hosts using pssh with different options.
  1. To read hosts file, include the -h host_file-name or –hosts host_file_name option.
  2. To include a default username on all hosts that do not define a specific user, use the -l username or –user username option.
  3. You can also display standard output and standard error as each host completes. By using the -i or –inline option.
  4. You may wish to make connections time out after the given number of seconds by including the -t number_of_seconds option.
  5. To save standard output to a given directory, you can use the -o /directory/path option.
  6. To ask for a password and send to ssh, use the -A option.
Let’s see few examples and usage of pssh commands:
1. To execute echo “Hello TecMint” on the terminal of the multiple Linux hosts by root user and prompt for the root user’s password, run this command below.
Important: Remember all the hosts must be included in the host file.
# pssh -h pssh-hosts -l root -A echo "Hello TecMint"
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password: 
[1] 15:54:55 [SUCCESS] 192.168.0.10:22
[2] 15:54:56 [SUCCESS] 192.168.0.11:22
Note: In the above command “pssh-hosts” is a file with list of remote Linux servers IP address and SSH port number that you wish to execute commands.
2. To find out the disk space usage on multiple Linux servers on your network, you can run a single command as follows.
# pssh -h pssh-hosts -l root -A -i "df -hT"
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password: 
[1] 16:04:18 [SUCCESS] 192.168.0.10:22
Filesystem     Type   Size  Used Avail Use% Mounted on
/dev/sda3      ext4    38G  4.3G   32G  12% /
tmpfs          tmpfs  499M     0  499M   0% /dev/shm
/dev/sda1      ext4   190M   25M  156M  14% /boot
[2] 16:04:18 [SUCCESS] 192.168.0.11:22
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs        30G  9.8G   20G  34% /
devtmpfs                devtmpfs  488M     0  488M   0% /dev
tmpfs                   tmpfs     497M  148K  497M   1% /dev/shm
tmpfs                   tmpfs     497M  7.0M  490M   2% /run
tmpfs                   tmpfs     497M     0  497M   0% /sys/fs/cgroup
/dev/sda1               xfs       497M  166M  332M  34% /boot
3. If you wish to know the uptime of multiple Linux servers at one go, then you can run the following command.
# pssh -h pssh-hosts -l root -A -i "uptime"
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password: 
[1] 16:09:03 [SUCCESS] 192.168.0.10:22
16:09:01 up  1:00,  2 users,  load average: 0.07, 0.02, 0.00
[2] 16:09:03 [SUCCESS] 192.168.0.11:22
06:39:03 up  1:00,  2 users,  load average: 0.00, 0.06, 0.09
You can view the manual entry page for the pssh command to get many other options to find out more ways of using pssh.
# pssh --help
pssh commands and usages
pssh commands and usages

Summary

Parallel SSH or PSSH is a good tool to use for executing commands in an environment where a System Administrator has to work with many servers on a network. It will make it easy for commands to be executed remotely on different hosts on a network.

Almost all the different options used with these tools are the same except for few that are related to the specific functionality of a given utility.

How to Use Pscp to Transfer/Copy Files to Multiple Linux Servers

While using pscp you need to create a separate file that includes the number of Linux server IP address and SSH port number that you need to connect to the server.

Copy Files to Multiple Linux Servers

Let’s create a new file called “myscphosts.txt” and add the list of Linux hosts IP address and SSH port (default 22) number as shown.
192.168.0.3:22
192.168.0.9:22
Once you’ve added hosts to the file, it’s time to copy files from local machine to multiple Linux hosts under /tmp directory with the help of following command.
# pscp -h myscphosts.txt -l tecmint -Av wine-1.7.55.tar.bz2 /tmp/
OR
# pscp.pssh -h myscphosts.txt -l tecmint -Av wine-1.7.55.tar.bz2 /tmp/
Sample Output
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password: 
[1] 17:48:25 [SUCCESS] 192.168.0.3:22
[2] 17:48:35 [SUCCESS] 192.168.0.9:22
Explanation about the options used in the above command.
  1. -h switch used to read a hosts from a given file and location.
  2. -l switch reads a default username on all hosts that do not define a specific user.
  3. -A switch tells pscp ask for a password and send to ssh.
  4. -v switch is used to run pscp in verbose mode.

Copy Directories to Multiple Linux Servers

If you want to copy entire directory use -r option, which will recursively copy entire directories as shown.
# pscp -h myscphosts.txt -l tecmint -Av -r Android\ Games/ /tmp/
OR
# pscp.pssh -h myscphosts.txt -l tecmint -Av -r Android\ Games/ /tmp/
Sample Output
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password: 
[1] 17:48:25 [SUCCESS] 192.168.0.3:22
[2] 17:48:35 [SUCCESS] 192.168.0.9:22
You can view the manual entry page for the pscp or use pscp --help command to seek for help.

Conclusion

This tool is worth trying as if you control multiple Linux systems and already have SSH key-based passwordless login setup.