|
|
/usr/bin/ssh-copy-id: ERROR: failed to open ID file '/home/devops/.pub': No such file or directory9 e9 w( X1 k% {8 t5 R3 T7 O
(to install the contents of '/home/devops/.pub' anyway, look at the -f option)' }/ a, A: l! A& \. z0 x
* L' P" }$ }: f9 R* i
解决办法:
. H+ R! S( ]. i/ q% X+ X! }执行$ w" F y [) n4 W, t
$ ssh-keygen |) L: t9 Y# X. o0 |
Generating public/private rsa key pair.( e8 M/ F1 _1 g# K
Enter file in which to save the key (/home/devops/.ssh/id_rsa):
+ v: l4 m0 x A8 P. T" }; aEnter passphrase (empty for no passphrase): , H& U6 X U" p. |2 b- }. G/ N
Enter same passphrase again: % ?. T2 h+ ^, K
Your identification has been saved in /home/devops/.ssh/id_rsa.$ {. T3 h2 y+ P5 g3 ]0 t( ~8 ]
Your public key has been saved in /home/devops/.ssh/id_rsa.pub.) w: w: F) ?# G w/ x
The key fingerprint is:
$ [( W* H7 G, OSHA256:CH2G+MU8Htu5fyRzPfh5cpvK5lABf2DFCbibOhGEqM0 devops@voyah-prod-nginx-1
1 E7 | y2 P" @/ i( C5 E* NThe key's randomart image is:+ {/ f. ?/ n- }7 E4 x+ x" m7 j
+---[RSA 2048]----+: P( ~7 H4 } l$ y7 A' l" ?8 ]1 i& x
| . . ..++..|
+ M q! f9 J$ T k) h| + = . .+ .o |7 x- [) g* ?! v& k9 L. R. p' u
| * o X .o . |8 D# |. j/ L& X
| . E * * o o |9 ^; O8 L- [9 a, A: c4 r( L
| o S + o... |0 w4 g! P' i' A4 ]8 u$ H% {
| . ++.o..|3 T; q, U Z# G! v
| +. =. o|# ~9 W" z, t2 y
| o .o.oo+|
. R3 I# W! O4 ]1 R- F| . +=.=o|
# j* g) {7 ^3 C+ p# }; I2 S( e+----[SHA256]-----+, ]% T. J' Q! H5 \" ]
+ F# P, z; C5 c
2 J y7 P1 T8 Y; P再执行:
+ R. z1 T0 V( y; y5 t8 fssh-copy-id -p 60028 12.22.0.94
6 @: @+ n: P' n, A/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/devops/.ssh/id_rsa.pub"
* V! S( U* c CThe authenticity of host '[12.22.0.94]:60028 ([12.22.0.94]:60028)' can't be established.. q" A5 |7 d/ W b# \
ECDSA key fingerprint is SHA256:n6Wd/6oZqpIdyO57LdlQto78xHZBvyBhtsQbmByBq2o.4 [4 e+ u" t& O% ?9 K# d8 Y' K
ECDSA key fingerprint is MD5:8f:e8:74:16:d4:66:97:98:44:86:8a:99:4a:c5:e8:82.
# q! I' _( Y+ R; Y# `0 L& g5 eAre you sure you want to continue connecting (yes/no)?
- A9 x8 a/ o; X3 m
9 R, W8 o' C# e$ f问题解决。
7 Z" J% T7 s% u- X |
|