CentOS 6.5 configuration ssh key-free login to execute pssh command explanation

CentOS 6.5 configuration ssh key-free login to execute pssh command explanation

1. Check and install pssh, yum list pssh

2. Because keyless login is not configured, the pssh command execution fails.

[root@bogon ]# pssh -H [email protected] -i uptime
[1] 11:00:36 [FAILURE] [email protected] Exited with error code 255
Stderr: The authenticity of host '192.168.245.129 (192.168.245.129)' can't be established.
RSA key fingerprint is 84:2d:70:33:1c:45:fa:e6:4b:94:72:7e:10:98:7c:a8.
Are you sure you want to continue connecting (yes/no)? 
Host key verification failed.

3. Generate a secret key.

[root@bogon tmp]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
9e:14:9a:cc:8d:9b:fd:51:c5:68:24:e1:ce:c6:d7:33 root@bogon
The key's randomart image is:
+--[RSA 2048]----+
| o.. |
| .oo |
| . . oo |
| o = = . o |
| * S = o E |
| * ooo |
| o + . |
| . . |
| . |
+-----------------+
[[email protected]]#ll
total 8
-rw------- 1 root root 1675 Aug 22 11:06 id_rsa
-rw-r--r-- 1 root root 392 Aug 22 11:06 id_rsa.pub

4. Copy to the managed object.

[root@bogon .ssh]# ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]
The authenticity of host '192.168.245.129 (192.168.245.129)' can't be established.
RSA key fingerprint is 84:2d:70:33:1c:45:fa:e6:4b:94:72:7e:10:98:7c:a8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.245.129' (RSA) to the list of known hosts.
reverse mapping checking getaddrinfo for bogon [192.168.245.129] failed - POSSIBLE BREAK-IN ATTEMPT!
[email protected]'s password: 
Now try logging into the machine, with "ssh '[email protected]'", and check in:
 .ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.

5. The pssh command was executed successfully.

[root@bogon .ssh]# pssh -H [email protected] -i uptime
[1] 11:10:39 [SUCCESS] [email protected]
 20:10:39 up 2:07, 1 user, load average: 0.00, 0.00, 0.00

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Solution to the "syntax error: unexpected end of file" message when running .sh script in CentOS7
  • Use crontab to run the script of executing jar program regularly in centOS6
  • How to execute PHP scheduled tasks in CentOS7
  • Detailed explanation of using crontab to execute tasks regularly under CentOS 7
  • Solve the problem that /etc/rc.local does not execute when starting centos7
  • How to set up a scheduled task to execute a specified script in centos
  • CentOS uses expect to remotely execute scripts and commands in batches

<<:  Detailed tutorial on configuration method of Mysql 5.7.19 free installation version (64-bit)

>>:  Mysql 5.7.19 free installation version encountered pitfalls (collection)

Recommend

Introduction to using MySQL commands to create, delete, and query indexes

MySQL database tables can create, view, rebuild a...

Summary of tips for setting the maximum number of connections in MySQL

Method 1: Command line modification We only need ...

Typical cases of MySQL index failure

Table of contents Typical Cases Appendix: Common ...

Docker custom network detailed introduction

Table of contents Docker custom network 1. Introd...

Tutorial on importing and exporting Docker containers

background The popularity of Docker is closely re...

Detailed instructions for installing mysql5.7 database under centos7.2

The mysql on the server is installed with version...

HTML structured implementation method

DIV+css structure Are you learning CSS layout? Sti...

Common methods of Vue componentization: component value transfer and communication

Related knowledge points Passing values ​​from pa...

How to configure jdk environment under Linux

1. Go to the official website to download the jdk...

Brief analysis of centos 7 mysql-8.0.19-1.el7.x86_64.rpm-bundle.tar

Baidu Cloud Disk: Link: https://pan.baidu.com/s/1...

Pycharm2017 realizes the connection between python3.6 and mysql

This article shares with you how to connect pytho...

HTML embedded in WMP compatible with Chrome and IE detailed introduction

In fact, there are many corresponding writing met...

The past two years with user experience

<br />It has been no more than two years sin...

Detailed explanation of Bootstrap grid vertical and horizontal alignment

Table of contents 1. Bootstrap Grid Layout 2. Ver...

Several methods to solve the problem of MySQL fuzzy query index failure

When we use the like % wildcard, we often encount...