]> andersk Git - gssapi-openssh.git/blobdiff - openssh/contrib/ssh-copy-id
merged OPENSSH_5_2P1_GSSAPI_20090225 to GPT-branch
[gssapi-openssh.git] / openssh / contrib / ssh-copy-id
index a1c0a9234316ce7e843f0d7237fafbeca3ffc7cb..df74d25c8c0d3d5595da72551f5b9c7e5152c004 100644 (file)
@@ -1,17 +1,17 @@
 #!/bin/sh
 
-# Shell script to install your identity.pub on a remote machine
+# Shell script to install your public key on a remote machine
 # Takes the remote machine name as an argument.
 # Obviously, the remote machine must accept password authentication,
 # or one of the other keys in your ssh-agent, for this to work.
 
-ID_FILE="${HOME}/.ssh/identity.pub"
+ID_FILE="${HOME}/.ssh/id_rsa.pub"
 
 if [ "-i" = "$1" ]; then
   shift
   # check if we have 2 parameters left, if so the first is the new ID file
   if [ -n "$2" ]; then
-    if expr "$1" : ".*\.pub" ; then
+    if expr "$1" : ".*\.pub" > /dev/null ; then
       ID_FILE="$1"
     else
       ID_FILE="$1.pub"
@@ -24,7 +24,7 @@ else
   fi
 fi
 
-if [ -z "`eval $GET_ID`" -a -r "${ID_FILE}" ] ; then
+if [ -z "`eval $GET_ID`" ] && [ -r "${ID_FILE}" ] ; then
   GET_ID="cat ${ID_FILE}"
 fi
 
This page took 0.038751 seconds and 4 git commands to generate.