summaryrefslogtreecommitdiff
path: root/debian/patches/ssh-copy-id-trailing-colons.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/ssh-copy-id-trailing-colons.patch')
-rw-r--r--debian/patches/ssh-copy-id-trailing-colons.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/ssh-copy-id-trailing-colons.patch b/debian/patches/ssh-copy-id-trailing-colons.patch
new file mode 100644
index 000000000..1063fc6bb
--- /dev/null
+++ b/debian/patches/ssh-copy-id-trailing-colons.patch
@@ -0,0 +1,25 @@
1Description: ssh-copy-id: Strip trailing colons from hostname
2Author: Karl Goetz <karl@kgoetz.id.au>
3Author: Colin Watson <cjwatson@debian.org>
4Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1530
5Bug-Debian: http://bugs.debian.org/226172
6Bug-Ubuntu: https://bugs.launchpad.net/bugs/249706
7Last-Update: 2010-02-27
8
9Index: b/contrib/ssh-copy-id
10===================================================================
11--- a/contrib/ssh-copy-id
12+++ b/contrib/ssh-copy-id
13@@ -38,10 +38,10 @@
14 exit 1
15 fi
16
17-{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
18+{ eval "$GET_ID" ; } | ssh ${1%:} "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
19
20 cat <<EOF
21-Now try logging into the machine, with "ssh '$1'", and check in:
22+Now try logging into the machine, with "ssh '${1%:}'", and check in:
23
24 .ssh/authorized_keys
25