Bugzilla – Attachment 2745 Details for
Bug 2488
"ssh-copy-id -o ControlPath=/tmp/foo" hangs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
the patch
0001-Make-ssh-copy-id-work-when-ControlPath-is-set.patch (text/plain), 2.22 KB, created by
Salvador Fandiño
on 2015-11-02 22:15:16 AEDT
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Salvador Fandiño
Created:
2015-11-02 22:15:16 AEDT
Size:
2.22 KB
patch
obsolete
>From e60ee9075f9520ca0ab3e8c976397b0548f997a4 Mon Sep 17 00:00:00 2001 >From: Salvador Fandino <sfandino@yahoo.com> >Date: Mon, 2 Nov 2015 10:37:24 +0100 >Subject: [PATCH] Make ssh-copy-id work when ControlPath is set > >until now, the following command was hanging: > > ssh-copy-id -o ControlPath=/tmp/foo hostname > >There were two issues related to ControlPath that this patch fixes: > >1) In order to retrieve the version of the remote SSH server, >ssh-copy-id was running "ssh" with an empty set of preferred >authentications expecting it to fail. When "ControlPath" is passed, >the command doesn't fail and a never-ending remote shell session is >started. This patch, forces "ControlPath=none" for that command >overriding any other ControlPath configuration. > >2) Later, another "ssh" command is run as the way to check if the >selected public key can already be used for authentication in order to >skip its installation. Wenth a proper "ControlPath" was given the >connection was succeeding and so the key assumed to be already >installed on the server. Again, a "ControlPath=none" argument is >added into that "ssh" command. >--- > contrib/ssh-copy-id | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id >index ae88e99..06d2e72 100644 >--- a/contrib/ssh-copy-id >+++ b/contrib/ssh-copy-id >@@ -215,6 +215,7 @@ populate_new_ids() { > # The point being that if file based, ssh needs the private key, which it cannot > # find if only given the contents of the .pub file in an unrelated tmpfile > ssh -i "${PRIV_ID_FILE:-$L_TMP_ID_FILE}" \ >+ -o ControlPath=none \ > -o PreferredAuthentications=publickey \ > -o IdentitiesOnly=yes "$@" exit 2>$L_TMP_ID_FILE.stderr </dev/null > if [ "$?" = "$L_SUCCESS" ] ; then >@@ -243,7 +244,7 @@ populate_new_ids() { > printf '%s: INFO: %d key(s) remain to be installed -- if you are prompted now it is to install the new keys\n' "$0" "$(printf '%s\n' "$NEW_IDS" | wc -l)" >&2 > } > >-REMOTE_VERSION=$(ssh -v -o PreferredAuthentications=',' "$@" 2>&1 | >+REMOTE_VERSION=$(ssh -v -o PreferredAuthentications=',' -o ControlPath=none "$@" 2>&1 | > sed -ne 's/.*remote software version //p') > > case "$REMOTE_VERSION" in >-- >2.5.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2488
: 2745