Bug 27599

Summary: ssh-copy-id errors and does not work
Product: Mageia Reporter: Thomas Bigot <thomas.bigot>
Component: RPM PackagesAssignee: Guillaume Rousse <guillomovitch>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: openssh-8.4p1-1.mga8.src.rpm CVE:
Status comment:

Description Thomas Bigot 2020-11-12 20:38:45 CET
Description of problem:

ssh-copy-id displays errors and does not seem to copy keys.

Version-Release number of selected component (if applicable):
8.4p1-1.mga8

How reproducible:
always

Steps to Reproduce:

$ ssh-copy-id me@server
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/me/.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
/usr/bin/ssh-copy-id: line 251: warning: here-document at line 251 delimited by end-of-file (wanted `EOF')
/usr/bin/ssh-copy-id: line 250: warning: here-document at line 250 delimited by end-of-file (wanted `EOF')
/usr/bin/ssh-copy-id: line 254: /dev/null`: Permission denied
/usr/bin/ssh-copy-id: line 260: EOF: command not found
me@server's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'me@server'"
and check to make sure that only the key(s) you wanted were added.


Looking at the server, no  /home/me/authorized_keys has been created.
Comment 1 Lewis Smith 2020-11-15 20:31:21 CET
Thank you for reporting this.
[The 'ssh-copy-id' command is in pkg openssh-clients].

> Now try logging into the machine, with:   "ssh 'me@server'"
> and check to make sure that only the key(s) you wanted were added
You do not say whether you can log into the server. What happens when you do, or try to?

> Looking at the server, no  /home/me/authorized_keys has been created
The man page says:
"By default it adds the keys by appending them to the remote user's
 ~/.ssh/authorized_keys
(creating the file, and directory, if necessary)"

Is that file (path) you looked for?

[To be assigned to guillomovitch].

CC: (none) => lewyssmith

Comment 2 Thomas Bigot 2020-11-17 10:07:11 CET
I can’t then log into the server without a password afterwards.

Sorry, it was a typo, I indeed expected to find the new key in ~/.ssh/authorized_keys.
Comment 3 Lewis Smith 2020-11-17 10:45:29 CET
Thank you for these clarifications.
I was not aware (stranger to this field) that what you are trying to achieve is remote login without the need to give a password. At least you can for the moment (it seems) login with one.

Assigning to Guillaume for 'openssh'.

CC: lewyssmith => (none)
Assignee: bugsquad => guillomovitch

Comment 4 Guillaume Rousse 2020-11-19 20:05:25 CET
Should be fixed with incoming openssh-8.4p1-2.mga8, thanks for reporting the issue.

Resolution: (none) => FIXED
Status: NEW => RESOLVED