[openssh-commits] [openssh] 11/11: fixup! if -s & -p specified, mention 'sftp -P' on

git+noreply at mindrot.org git+noreply at mindrot.org
Thu May 25 18:26:23 AEST 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 2709809fd616a0991dc18e3a58dea10fb383c3f0
Author: Philip Hands <phil at hands.com>
Date:   Wed May 24 19:41:14 2023 +0200

    fixup! if -s & -p specified, mention 'sftp -P' on
    
    success
    
    SSH-Copy-ID-Upstream: 32686e7c65b4fa2846e474d3315102dfa0f043b0
---
 contrib/ssh-copy-id | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index fcf0edba..da6bd18d 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -127,7 +127,7 @@ do
       use_id_file "${OPTARG:-$DEFAULT_PUB_ID_FILE}"
       ;;
     o|F)
-      SSH_OPTS="${SSH_OPTS:+$SSH_OPTS }-$OPT '$(quote "${OPTARG}")'"
+      OPTS_oF="${OPTS_oF:+$OPTS_oF }-$OPT '$(quote "${OPTARG}")'"
       ;;
     f)
       FORCED=1
@@ -166,7 +166,8 @@ fi
 
 USER_HOST="$*"
 # tack the hostname onto SSH_OPTS
-SSH_OPTS="${SSH_OPTS:+$SSH_OPTS }${SSH_PORT:+-p $SSH_PORT }'$(quote "$USER_HOST")'"
+OPTS_USER_HOST="${OPTS_oF:+$OPTS_oF }'$(quote "$USER_HOST")'"
+SSH_OPTS="${SSH_PORT:+-p $SSH_PORT }$OPTS_USER_HOST"
 # and populate "$@" for later use (only way to get proper quoting of options)
 eval set -- "$SSH_OPTS"
 
@@ -378,7 +379,7 @@ else
 
 	Number of key(s) added: $ADDED
 
-	Now try logging into the machine, with:   "${SFTP:-ssh}${SSH_PORT:+ -${PORT_OPT:-p} '$SSH_PORT'} ${SSH_OPTS}"
+	Now try logging into the machine, with:   "${SFTP:-ssh}${SSH_PORT:+ -${PORT_OPT:-p} $SSH_PORT} ${OPTS_USER_HOST}"
 	and check to make sure that only the key(s) you wanted were added.
 
 	EOF

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list