1 Generate public-private key pairs
[atguigu@hadoop102 .ssh]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/atguigu/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/atguigu/.ssh/id_dsa.
Your public key has been saved in /home/atguigu/.ssh/id_dsa.pub.
The key fingerprint is:
25:0a:23:7f:a7:f0:d1:78:f6:59:57:e3:cc:78:49:d0 atguigu@hadoop102
The key's randomart image is:
+--[ DSA 1024]----+
| .. |
| .E |
| . o . . o.|
| o o + o *.o|
| o = S ...* |
| + * . o .. |
| o o |
| |
| |
+-----------------+
[atguigu@hadoop102 .ssh]$ ssh-copy-id hadoop103
/usr/bin/ssh-copy-id: ERROR: No identities found
After regenerating the key pair, it was copied to another machine, HadoOP103 times made the following mistake:
/usr/bin/ssh-copy-id: ERROR: No identities found
The reason mentioned online is that no key pair has been generated.
Obviously, I am not the reason, as mentioned below:
Then it is found that the public key path is missing and can be added through -i:
$ ssh-copy-id -i ~/.ssh/id_dsa.pub user@remote_ip
I tried it, and I solved it
[atguigu@hadoop102 .ssh]$ ssh-copy-id -i ~/.ssh/id_dsa.pub atguigu@hadoop103
atguigu@hadoop103's password:
Now try logging into the machine, with "ssh 'atguigu@hadoop103'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[atguigu@hadoop102 .ssh]$ ssh-copy-id -i ~/.ssh/id_dsa.pub atguigu@hadoop104
atguigu@hadoop104's password:
Now try logging into the machine, with "ssh 'atguigu@hadoop104'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[atguigu@hadoop102 .ssh]$ ssh hadoop104
Last login: Fri Dec 28 03:39:18 2018 from 192.168.31.1
[atguigu@hadoop104 ~]$ exit
logout
Connection to hadoop104 closed.
[atguigu@hadoop102 .ssh]$ ssh hadoop103
Last login: Fri Dec 28 03:39:18 2018 from 192.168.31.1
[atguigu@hadoop103 ~]$ exit
logout
Connection to hadoop103 closed.
div>
Read More:
- Copy forbidden in C + +++
- Solve the problem of copy failed: stat / var / lib / docker / TMP / docker builder 455335933 / opt: no such file or directory
- Linux remote copy command and not a regular file solution
- Copy file failed with 32
- Eclipse gets stuck saving copy and paste
- [Linux] solution: SCP different server copy file prompt permission denied, please try again
- Cannot read property ‘this compilation’ of undefined appears in copy webpack plugin
- ls: cannot access /usr/sbin/smartctl: No such file or directory /usr/sbin/smartctl not found
- Copy node causes NPM execution error: cannot find module ‘/ / lib / utils/ unsupported.js ‘
- RuntimeError: “unfolded2d_copy“ not implemented for ‘Half‘
- To solve the problem that windows Remote Desktop Services cannot copy and paste: restart rdpclip.exe
- Run time error: “unfolded2d”_ copy“ not implemented for ‘Half‘
- [Unity] Solve the problem of IOException: Failed to Copy… in Unity packaging apk
- (Copy python package, the problem generated) pip Fatal error in launcher: Unable to create process using
- How to batch create folders in Excel form and copy the specified files to a new folder
- Solution to the problem that SQL database query result field contains new line character, which leads to copy to excel dislocation
- Command /usr/bin/codesign failed with exit code 1
- Copy Xcode project encountered MAC error code – 8058 (error code – 8058)
- Today’s file “/usr/bin/yum”, line 30 problems
- Error reporting during QT operation under Ubuntu / usr / bin / LD: cannot find – LGL