summaryrefslogtreecommitdiff
path: root/debian/patches/ssh-copy-id-trailing-colons.patch
blob: 624e8d5a7b8a63748f3e38d1f5046604de059fcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: b/contrib/ssh-copy-id
===================================================================
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -38,10 +38,10 @@
   exit 1
 fi
 
-{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
+{ eval "$GET_ID" ; } | ssh ${1%:} "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
 
 cat <<EOF
-Now try logging into the machine, with "ssh '$1'", and check in:
+Now try logging into the machine, with "ssh '${1%:}'", and check in:
 
   .ssh/authorized_keys