[Bug 686671] [NEW] ssh-copy-id assumes $HOME
Tom Vaughan
686671 at bugs.launchpad.net
Tue Dec 7 17:40:25 GMT 2010
Public bug reported:
ssh-copy-id assumes that the default working directory on the remote
machine will be $HOME. In some cases the login scripts on the remote
machine change the working directory to something other than $HOME. The
patch below should solve this (not widely tested):
--- ssh-copy-id.orig 2010-12-07 09:36:20.297263103 -0800
+++ ssh-copy-id 2010-12-07 09:37:15.226054626 -0800
@@ -38,7 +38,7 @@
exit 1
fi
-{ eval "$GET_ID" ; } | ssh ${1%:} "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
+{ eval "$GET_ID" ; } | ssh ${1%:} "umask 077; cd $HOME; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
cat <<EOF
Now try logging into the machine, with "ssh '${1%:}'", and check in:
** Affects: openssh (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openssh in ubuntu.
https://bugs.launchpad.net/bugs/686671
Title:
ssh-copy-id assumes $HOME
More information about the Ubuntu-server-bugs
mailing list