View | Details | Raw Unified | Return to bug 2331
Collapse All | Expand All

(-)a/contrib/ssh-copy-id (-2 / +4 lines)
Lines 210-220 populate_new_ids() { Link Here
210
      while read ID ; do
210
      while read ID ; do
211
        printf '%s\n' "$ID" > $L_TMP_ID_FILE
211
        printf '%s\n' "$ID" > $L_TMP_ID_FILE
212
212
213
        # the next line assumes $PRIV_ID_FILE only set if using a single id file - this
213
        # Check if we can log in to the remote machine, preferring the private id 
214
        # file and ignoring all id files specified in configuration files.
215
        # It is assumed that $PRIV_ID_FILE is only set if using a single id file - this
214
        # assumption will break if we implement the possibility of multiple -i options.
216
        # assumption will break if we implement the possibility of multiple -i options.
215
        # The point being that if file based, ssh needs the private key, which it cannot
217
        # The point being that if file based, ssh needs the private key, which it cannot
216
        # find if only given the contents of the .pub file in an unrelated tmpfile
218
        # find if only given the contents of the .pub file in an unrelated tmpfile
217
        ssh -i "${PRIV_ID_FILE:-$L_TMP_ID_FILE}" \
219
        ssh -F /dev/null -i "${PRIV_ID_FILE:-$L_TMP_ID_FILE}" \
218
            -o PreferredAuthentications=publickey \
220
            -o PreferredAuthentications=publickey \
219
            -o IdentitiesOnly=yes "$@" exit 2>$L_TMP_ID_FILE.stderr </dev/null
221
            -o IdentitiesOnly=yes "$@" exit 2>$L_TMP_ID_FILE.stderr </dev/null
220
        if [ "$?" = "$L_SUCCESS" ] ; then
222
        if [ "$?" = "$L_SUCCESS" ] ; then

Return to bug 2331