Problems with Passwordless SSH Public Key Authentication

Issues related to configuring your network
Post Reply
wp.rauchholz
Posts: 133
Joined: 2016/11/20 11:58:45

Problems with Passwordless SSH Public Key Authentication

Post by wp.rauchholz » 2018/11/09 15:17:58

Scenario:
CENTOS 7 home server with running ssh server (I can connect from my Windoes box via Putty to the server)

Trying to do the same with my CENTOS 7 laptop. THisis what I did

(1) I created the key with: ssh-keygen -t ecdsa
(2) chmod 700 ~/.ssh / chmod 600 ~/.ssh/*
(3) ssh-copy-id -p <my_port> -i ~/.ssh/id_ecdsa.pub <my_user>@<my_IP>

I get this error message. I googled and follsed some ofthe solutoins, but I dont' get it working.
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/wp.rauchholz/.ssh/id_ecdsa.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
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Thanks for helping me.

Wolfgang

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problems with Passwordless SSH Public Key Authentication

Post by TrevorH » 2018/11/09 16:00:04

Catch 22: you cannot login with it until the key is there and you're trying to use ssh-copy-id to copy the key files there but you've presumably disabled password access to the machine so it cannot prompt for a password to let you in. In that situation you will have to copy the file manually.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

wp.rauchholz
Posts: 133
Joined: 2016/11/20 11:58:45

Re: Problems with Passwordless SSH Public Key Authentication

Post by wp.rauchholz » 2018/11/09 21:38:27

Autsch!!!

Thank you. Wolfgang

Post Reply