- 积分
- 16844
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
/usr/bin/ssh-copy-id: ERROR: failed to open ID file '/home/devops/.pub': No such file or directory
* E+ W; l% j3 n O8 [ P (to install the contents of '/home/devops/.pub' anyway, look at the -f option)
8 c: D6 I7 B) L1 q5 T: F
0 }7 ]6 O0 O% q% Y5 m% _解决办法:
. Y8 i4 R) P1 x! D$ n) b执行
& E9 Y0 y3 |) W4 f, L9 v$ ssh-keygen 8 D2 ?8 n2 e4 `: u
Generating public/private rsa key pair.
9 `" i" {5 u! M4 n3 zEnter file in which to save the key (/home/devops/.ssh/id_rsa):
1 M) Z; t1 m A$ a {1 j! ^Enter passphrase (empty for no passphrase): - s2 N# g! b5 R+ {5 u9 }* W" s' L
Enter same passphrase again: , `6 M/ I1 p, D7 W6 n# `
Your identification has been saved in /home/devops/.ssh/id_rsa." t D0 }, j3 U, d( A: A* [' i
Your public key has been saved in /home/devops/.ssh/id_rsa.pub.$ L# m ~ x5 m1 @- c+ q
The key fingerprint is:
7 h$ l, t. A. NSHA256:CH2G+MU8Htu5fyRzPfh5cpvK5lABf2DFCbibOhGEqM0 devops@voyah-prod-nginx-1
$ {- F( N/ f( gThe key's randomart image is:( v1 Q; ` U/ }! O; J& d
+---[RSA 2048]----+
7 w& ~+ g6 z5 {" d5 ^# I| . . ..++..|) k: \8 F8 r' i& S
| + = . .+ .o |3 j; c* J, y. g4 R1 u
| * o X .o . |- v( {: c/ ]/ n) z4 ]
| . E * * o o |
8 c8 {# @* A+ c) G8 C| o S + o... |1 T5 b8 }+ c! r' e; P2 h3 `
| . ++.o..|( F9 e t) |* `; ^+ ]
| +. =. o|
" l4 G. |: b8 ^8 i5 F- ?| o .o.oo+| w$ e5 k& v6 N' g; y* a& H
| . +=.=o|
7 H- l' p6 T4 n9 I$ R5 x9 o+----[SHA256]-----+- Z! Y8 R$ @& n7 C
! t* u/ G- }2 {1 k9 }9 {5 U$ B+ p! f9 I
再执行:
" v. r7 P: \6 Xssh-copy-id -p 60028 12.22.0.94
: b: r) }7 W( \! E# d/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/devops/.ssh/id_rsa.pub"
1 f$ c9 x, S& V# ]7 LThe authenticity of host '[12.22.0.94]:60028 ([12.22.0.94]:60028)' can't be established.
8 W- j4 o7 N! b2 Y/ nECDSA key fingerprint is SHA256:n6Wd/6oZqpIdyO57LdlQto78xHZBvyBhtsQbmByBq2o.
# W! R5 `8 }3 y. eECDSA key fingerprint is MD5:8f:e8:74:16:d4:66:97:98:44:86:8a:99:4a:c5:e8:82.
7 o( K! v0 {3 ]; T$ Y$ ~Are you sure you want to continue connecting (yes/no)? " C1 n3 N9 h ]& ~; h3 P
9 u4 s$ [. }" ]! j/ K, H6 _问题解决。
% I5 B( E( j V( T |
|