|
|
sh: .ssh/authorized_keys: Permission denied. D4 c8 ~& C- W5 I6 I: b
9 e9 D* Q% y+ s: z
( m1 _; I0 Y0 v遇到这个问题检查,发现ssh-copy-id -p 60028 172.27.54.190
: F6 Y! @( d- B/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/devops/.ssh/id_rsa.pub" ' j. ~0 d% g/ O) H# I* c
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
& W4 X0 L+ [- f$ t- |' T+ N! W/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys 0 [0 d* A7 ^" F- k
devops@172.27.54.190's password:
0 u$ y, x, f- W: n' g; T8 \sh: .ssh/authorized_keys: Permission denied
$ `) O+ y h# t. F4 l3 l2 g9 s/ b
) M _$ X1 m4 M3 W
1 \( l5 }& _- Z" z7 G+ U. L; t6 G) q+ ]5 J7 F
解决问题检查ssh配置文件
0 B. O2 |( e& a0 l
7 t' g9 x0 p# Y, v, E & O: b( M9 w' U9 x2 J1 [
#PubkeyAuthentication yes 4 t, L6 e" y0 |$ f$ y4 e
最后还是检查目标主机
$ p K; k( e% S7 _8 f
6 X4 t6 S) z) W3 S6 h
5 \. ~' Q) [5 |. K# ~1 H. T1 a( C! Y9 u+ T h
[devops@dap-prod-es1 .ssh]$ cat authorized_keys
- I0 b6 _- j+ @- gssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCf9sFnq0Ly1M/I0M9N30k76CP10eFBa7TxDytW1mkcWYJ6jl/IC9n4l4vlSHR/D4VM2YtCNKIgna9UQbn2qkRog7pNpph4aokfesvhvWoZzFmp7sqzXw9jfmiIqDcxtokYQaqCZoibvGkRcMQwB3nBekI1gIoe7RkXqNZiQBhEst5cBcJoBKRKLHotkSKyqReKGH93VhWEkI/mp3pKjDi1STtd+IDgGfGhr4XY/3FM2g0xg0tNOnHKLFhqf39SULcM562+VMOYkEggxcXD3msMXQDeOpYDR1TTWLoJrEL/Fgx4gOvnnb8pL09XEgX31Cq6tBOY8Gj6U1TXnUGE1vR root@080tssp \
0 o8 T. R/ l0 ossh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpRsyD0G2bBpiqae8omFvOMcE1tqUEY3rxOUolunplxwl4yiDynF22ObFMCZl5jZIRM+ZfecJ/7nqNknXRZ6WjqoUDKBjTXBBb/8mbNvriWsb83Y+GGNCcUb4/ihRAnlhiBe8FhY+gco0MdTlnui3jRi/6fdnNUpsVB8tJULjWoGoV1tQnLfXVeuLd3Oh+Orsl4MjWY3d0aoAqx+JbocyMAKAONYS+cZStphW5mCZd+7PZP6nPXwWoC1v00OF18mcFpmkt21MCUB1UP5yfFX6z0nPaqvmuFyxfUzWjpdwKC/BmY3apGEx/Ao3eTNEe+i6Ik+0/12piNGt0UxYh3QLv root@prod-om-ansible-02 \ 4 K0 H8 \' m, R5 h
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDaMQPIQpLFyqpULR06koXEPoNN8HrCF44cZANz8GFOFQw/dA1t0t1nf8kWYsYo5V8ELCjZT+ImeXDfEHsAmSZRig55+Jd3zXKfOc4jmguShHpk4bCjxjudRtVwSB0tqZ8Epf79aLfG4vM5nstJOiyfIc/8XeAubOs+o9/DWtCnCJj78DPQOORmvaqUPsrUJ11637kqqB294xLryesVZAbo34BrUyANoPC1+NtFIASHAv7OLGjXJxl23evsv5KBqHe3nm9p3ZcTDAn1suyMBZlC+YKYtZzx9ga4zXH0erWgtoKL/hW4XJKp/lGFFvdiIj8cFUWCHU/58myCXRCF9xat devops@prod-om-ansible-02 2 A. Y- O3 J, x
[devops@dap-prod-es1 .ssh]$ ls
& y- M) n) B) u4 Z$ [authorized_keys 1 B) f6 Z s6 w
[devops@dap-prod-es1 .ssh]$ ll & F$ w8 h7 F7 U4 P. h' E/ {
total 4 0 E" G' s, V3 e! e; O6 e9 h
-rw-r--r--. 1 root root 1210 Dec 24 15:05 authorized_keys
( R [1 N: @. x" `2 s$ `9 ][devops@dap-prod-es1 .ssh]$
4 i+ o( p) e [5 A- ]- l 1 k" |# w- _3 q! x* m
! n9 i# g; G2 u8 Q) I( W3 {& z |
|