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 Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/686671 Title: ssh-copy-id assumes $HOME -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs