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 ?
Thanks


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 ?
Thanks