Bug 1885336 - ssh-copy-id throws a warning on F33 KDE base installation
Summary: ssh-copy-id throws a warning on F33 KDE base installation
Keywords:
Status: CLOSED DUPLICATE of bug 1884231
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 33
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-05 16:10 UTC by David McCheyne
Modified: 2020-10-06 07:25 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-06 07:25:38 UTC
Type: Bug


Attachments (Terms of Use)

Description David McCheyne 2020-10-05 16:10:01 UTC
Description of problem:
running ssh-copy-id as a non-admin user returns an error, but seems to complete anyway

Version-Release number of selected component (if applicable):
Fedora 33 KDE

How reproducible:
Consistently

Steps to Reproduce:
1. Install Fedora 33 KDE, standard options
2. create an ssh key with ssh-keygen and accept defaults
3. run `ssh-copy-id -f user@host`

Actual results:
ssh-copy-id throws a warning:
$ ssh-copy-id -f <user>@<host>
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/dmccheyne/.ssh/id_rsa.pub"
/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

Number of key(s) added: 1

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


Expected results:
ssh-copy-id completes cleanly with output like:
Number of key(s) added: 1

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

Additional info:
I've tried a few length keys, and copying keys into the host works ok. I suspect there's just a formatting issue with this block:
  INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF)
        cd;
        umask 077;
        mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
          { [ -z \`tail -1c ${AUTH_KEY_FILE} 2>/dev/null\` ] || echo >> ${AUTH_KEY_FILE} || exit 1; } &&
          cat >> ${AUTH_KEY_FILE} ||
          exit 1;
        if type restorecon >/dev/null 2>&1; then
          restorecon -F .ssh ${AUTH_KEY_FILE};
        fi
EOF

Comment 1 Jakub Jelen 2020-10-06 07:25:38 UTC

*** This bug has been marked as a duplicate of bug 1884231 ***


Note You need to log in before you can comment on or make changes to this bug.