kentpeacock / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
b58e57
diff -up openssh-7.4p1/contrib/ssh-copy-id.1.legacy-ssh-copy-id openssh-7.4p1/contrib/ssh-copy-id.1
b58e57
--- openssh-7.4p1/contrib/ssh-copy-id.1.legacy-ssh-copy-id	2016-12-19 05:59:41.000000000 +0100
b58e57
+++ openssh-7.4p1/contrib/ssh-copy-id.1	2017-02-09 09:23:25.366651136 +0100
b58e57
@@ -185,6 +185,19 @@ should prove enlightening (N.B. the mode
b58e57
 .Fl W
b58e57
 option, rather than
b58e57
 .Xr nc 1 ) .
b58e57
+.Sh ENVIRONMENT
b58e57
+.Bl -tag -width Ds
b58e57
+.Pp
b58e57
+.It Pa SSH_COPY_ID_LEGACY
b58e57
+If the 
b58e57
+.Cm SSH_COPY_ID_LEGACY
b58e57
+environment variable is set, the
b58e57
+.Nm
b58e57
+is run in a legacy mode. In this mode, the 
b58e57
+.Nm
b58e57
+doesn't check an existence of a private key and doesn't do remote checks
b58e57
+of the remote server versions or if public keys are already installed.
b58e57
+.El
b58e57
 .Sh "SEE ALSO"
b58e57
 .Xr ssh 1 ,
b58e57
 .Xr ssh-agent 1 ,
b58e57
diff -up openssh-7.4p1/contrib/ssh-copy-id.legacy-ssh-copy-id openssh-7.4p1/contrib/ssh-copy-id
b58e57
--- openssh-7.4p1/contrib/ssh-copy-id.legacy-ssh-copy-id	2017-02-09 09:23:25.366651136 +0100
b58e57
+++ openssh-7.4p1/contrib/ssh-copy-id	2017-02-09 09:33:07.896518169 +0100
b58e57
@@ -99,6 +99,9 @@ if [ -n "$SSH_AUTH_SOCK" ] && ssh-add -L
b58e57
   GET_ID="ssh-add -L"
b58e57
 fi
b58e57
 
b58e57
+# legacy environment variable implies forced copy
b58e57
+[ "x$SSH_COPY_ID_LEGACY" != "x" ] && FORCED=1
b58e57
+
b58e57
 while test "$#" -gt 0
b58e57
 do
b58e57
   [ "${SEEN_OPT_I}" ] && expr "$1" : "[-]i" >/dev/null && {