|
|
/usr/bin/ssh-copy-id: ERROR: failed to open ID file '/home/devops/.pub': No such file or directory
; [, @4 Z) A& M7 F# j d (to install the contents of '/home/devops/.pub' anyway, look at the -f option)& m* e( V+ G7 a' e% N/ V/ j
' `: E( [" D- F# K/ c' J: @- Z* i0 A解决办法:
% p& O2 N) h) L) n+ O执行2 v$ U! M! l- l0 |/ q" n# h. S, ~
$ ssh-keygen ) W8 A9 Y8 v0 P
Generating public/private rsa key pair.
- p8 W$ A/ z' ~5 f0 a1 w- _Enter file in which to save the key (/home/devops/.ssh/id_rsa):
& c- z- c2 W4 [. @ W$ \Enter passphrase (empty for no passphrase):
- P3 T1 p7 h ~5 D7 p6 uEnter same passphrase again: " Q* J- S+ _3 W& S! N+ A
Your identification has been saved in /home/devops/.ssh/id_rsa.
- }: F d( R+ c: _Your public key has been saved in /home/devops/.ssh/id_rsa.pub.
% h) \( P' d1 y% | T8 O$ [The key fingerprint is:0 q* C0 P# B1 g
SHA256:CH2G+MU8Htu5fyRzPfh5cpvK5lABf2DFCbibOhGEqM0 devops@voyah-prod-nginx-1; Q! w4 M- T5 b H
The key's randomart image is:4 N D5 t! m9 \/ c# T+ z$ `- f V
+---[RSA 2048]----+
2 G, _5 B, f9 p+ K9 C2 V7 ]1 K| . . ..++..|
+ K& L* J$ n. a" S M3 U$ `, p| + = . .+ .o |3 t. i2 S: l. S0 F+ \2 ]- j
| * o X .o . |
5 ?- O* f, Q9 a2 V3 \| . E * * o o |
- n7 C$ e3 P+ D6 L$ N9 D3 W| o S + o... |: S$ e# u0 y5 b
| . ++.o..|9 Z, M6 S5 t: j, C$ z% S1 ?: \2 E& c( I1 k
| +. =. o| E1 p8 ~% F, P% F$ u# N
| o .o.oo+|% c. V+ z3 K/ g2 C
| . +=.=o|
5 t7 z& T( v! F+----[SHA256]-----+
5 F, f* ^ x8 @7 W$ e% }# \% p$ Y, K7 k S* j
: L2 X4 q/ W. y7 N4 Q8 T
再执行:
, j. l6 u! ]2 i" }( ]ssh-copy-id -p 60028 12.22.0.94
6 p+ p& B: b3 o. `+ A# ?9 h/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/devops/.ssh/id_rsa.pub"3 o2 M. {' W ^1 T5 O* ~- S) v, |3 |
The authenticity of host '[12.22.0.94]:60028 ([12.22.0.94]:60028)' can't be established.
% ~) @* [; O# A5 O# b1 h' U8 @$ UECDSA key fingerprint is SHA256:n6Wd/6oZqpIdyO57LdlQto78xHZBvyBhtsQbmByBq2o." m. }4 P9 k, j7 j
ECDSA key fingerprint is MD5:8f:e8:74:16:d4:66:97:98:44:86:8a:99:4a:c5:e8:82.
$ t% z8 h) ?5 FAre you sure you want to continue connecting (yes/no)?
- M; x B; T4 u4 d/ W0 f1 J* E e' k! @9 p: k7 [
问题解决。- [5 L( j0 C5 {6 p: G4 L. F
|
|