Selected from Linux Selected from PHP
- Ubuntu 17.10 Install google's mod pagespeed for apache - PHP-Ubuntu-Youtube-dl simple script for converting and downloading youtube video or mp3
- Ubuntu SSH tunnel via proxy - PHP while loop with every row with a different color
- Install GoAccess Apache Log Analyzer Tool on Ubuntu 17.10 - PHP use while loop in function
- SSHFS and map folder with a proxy - PHP List Files And Folders As links
- How to connect to SSH server with a proxy - PHP Extract Text From String
➥ How to install and configure pssh using ssh keys to login on ubuntu
Added by sonik on 22-06-2018 and keywords: [ Print Article ]
Installation
For the installation you need only two commands that will install pssh.

$ sudo apt-get install python-pip
$ sudo pip install pssh


Generating RSA Keys

cd /home/YourUserName/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa -b 4096


You will be prompted for a location to save the keys, and a pass-phrase for the keys. This pass-phrase will protect your private key while it's stored on the hard drive:

[quote]

Generating public/private rsa key pair.
Enter file in which to save the key (/home/b/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/id_rsa.pub.

Your public key is now available as .ssh/id_rsa.pub in your home folder.

Transfer Client Key to Host
ssh-copy-id <username>@<host>

You will be asked for the remote host password, after typing it once you can try connecting with # ssh root@host and it will log you in without asking for password.
Do this to all of your hosts which you will put in the hosts.txt file.

Now create a host.txt, put your hosts there and run file and run
pssh --hosts hosts.txt --user root -i "uptime"

@All rights reserved with Copyright Webleit.info 2018 by Sonik_Blast [ Site Map ] [ RSS ] [ YouTube Mp3 Downloader and converter ]