Article 52VF9 Copying your Public SSH Key to a Server with SSH-Copy-ID when the server is already set with 'PubkeyAuthentication yes'

Copying your Public SSH Key to a Server with SSH-Copy-ID when the server is already set with 'PubkeyAuthentication yes'

by
Liniub
from LinuxQuestions.org on (#52VF9)
Hi

I have this scenario:

Server1 and server2 share the same configuration.
Both are configured to accepts only encrypted key.

Code:_______________ WAN ___________________________________
HOME LAN |ssh | remote LAN |
Client 1 ----> |---->|to Server1 ---> ssh to Server2 |
_______________| |___________________________________|On the server1 I've generated the new key an tried to login to server2
but it returns this message :

Code:server1@debian:~/.ssh$ sudo ssh-copy-id -i id_rsa_2 server2@192.168.1.95
[sudo] password for server2:
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/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
server2@192.168.1.95: Permission denied (publickey).How Do I add new key from server1 to server 2 ?

Thankslatest?d=yIl2AUoC8zA latest?i=5itQwfd-he8:uOHc1dDEHbE:F7zBnMy latest?i=5itQwfd-he8:uOHc1dDEHbE:V_sGLiP latest?d=qj6IDK7rITs latest?i=5itQwfd-he8:uOHc1dDEHbE:gIN9vFw5itQwfd-he8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments