Skip to content

Commit

Permalink
Make ssh-copy-id work on hosts lacking Bash
Browse files Browse the repository at this point in the history
  • Loading branch information
daisylb committed Mar 9, 2013
1 parent 107a1c8 commit 3c533af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fish/aliases.fish
Expand Up @@ -53,7 +53,7 @@ function ssh-copy-id
echo 'Usage: ssh-copy-id <server> [<pubkeyfile>]'
return 1
end
set cmd "bash -c 'mkdir -p .ssh; key=\""(cat $keyfile)"\"; echo \$key >> .ssh/authorized_keys; echo \$key >> .ssh/authorized_keys2; chmod 700 .ssh/; chmod 600 .ssh/authorized_keys .ssh/authorized_keys2'"
set cmd "sh -c 'mkdir -p .ssh; key=\""(cat $keyfile)"\"; echo \$key >> .ssh/authorized_keys; echo \$key >> .ssh/authorized_keys2; chmod 700 .ssh/; chmod 600 .ssh/authorized_keys .ssh/authorized_keys2'"
ssh $server $cmd
end

Expand Down

0 comments on commit 3c533af

Please sign in to comment.