Open HaleTom opened 7 years ago
I'm finding it hard to believe that a basic functionality of scp is broken - ie, copying a file to a remote server.
Surely there must be a work-around for this?
I updated the example in the top post to highlight that scp
works but using ssh-ident
doesn't.
Work around:
alias scp='BINARY_SSH=/usr/bin/scp scp'
Or to enable use from inside scripts, call the following script ~/bin/ssh-ident-wrapper
, and symlink it as ~/bin/scp
: and ~/bin/ssh
:
#!/bin/bash
# Wrapper to make ssh-ident work properly.
# See https://github.com/ccontavalli/ssh-ident/issues/35
set -euo pipefail
name=$(basename "$0")
# Assume that this script is in the path before anything else.
# Take the 2nd command as the one to execute
binary=$(which -a "$name" | sed -n '2p')
BINARY_SSH="$binary" ssh-ident "$@"
$BINARY_DIR
make any difference?Would checking argv[0] == scp
allow a work-around?
I'm using
ssh-ident
via a symlink. It confuses a filename with a hostname: