Bug 836650
Summary: | ssh-copy-id returns 0 even if the actual operation fails. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Gurhan Ozen <gozen> |
Component: | openssh | Assignee: | Petr Lautrbach <plautrba> |
Status: | CLOSED ERRATA | QA Contact: | Jiri Jaburek <jjaburek> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 6.4 | CC: | jburke, jjaburek, jstancek, pbunyan, pvrabec |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-02-21 10:28:02 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Gurhan Ozen
2012-06-29 19:23:21 UTC
There is the openssh-5.3p1-selabel.patch which changed behavior of ssh-copy-id to call also restorecon. This needs to be changed: --- /usr/bin/ssh-copy-id.orig 2012-07-09 17:39:31.861061082 +0200 +++ /usr/bin/ssh-copy-id 2012-07-09 17:51:25.129074800 +0200 @@ -38,7 +38,7 @@ exit 1 fi -{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys; test -x /sbin/restorecon && /sbin/restorecon .ssh .ssh/authorized_keys" || exit 1 +{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys && (test -x /sbin/restorecon && /sbin/restorecon ~/.ssh ~/.ssh/authorized_keys >/dev/null 2>&1 || true)" || exit 1 cat <<EOF Now try logging into the machine, with "ssh '$1'", and check in: Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0519.html |