Displaying 2 results from an estimated 2 matches for "pub_id_fil".
Did you mean:
pub_id_file
2012 Nov 07
1
ssh-copy-id usability improvement
...uffix other than .pub in argument to -i
diff --git a/ssh-copy-id b/ssh-copy-id
index 8cdad28..efa0d29 100755
--- a/ssh-copy-id
+++ b/ssh-copy-id
@@ -23,10 +23,10 @@ usage () {
use_id_file() {
local L_ID_FILE=$1
- if expr "$L_ID_FILE" : ".*\.pub$" >/dev/null ; then
- PUB_ID_FILE="$L_ID_FILE"
- else
+ if [ -f "$L_ID_FILE.pub" ]; then
PUB_ID_FILE="$L_ID_FILE.pub"
+ else
+ PUB_ID_FILE="$L_ID_FILE"
fi
PRIV_ID_FILE=$(dirname "$PUB_ID_FILE")/$(basename "$PUB_ID_FILE" .pub)
2016 May 30
1
[Bug 2575] New: ssh-copy-id fails when it can not find any key file in ~/.ssh
...:
/usr/bin/ssh-copy-id: ERROR: failed to open ID file '/root/.pub':
No such file or directory
(to install the contents of '/root/.pub' anyway, look at the -f
option)
It is caused by the false expectation, that there are some keys in
~/.ssh/ on the line 59:
DEFAULT_PUB_ID_FILE="$HOME/$(cd "$HOME" ; ls -t .ssh/id*.pub
2>/dev/null | grep -v -- '-cert.pub$' | head -n 1)"
It sets
+ DEFAULT_PUB_ID_FILE=/root/
which passes the condition
+ '[' -r /root/ ']'
and the execution gets into the function use_id_file() unn...