Re:SSH Tricks
by dotBen on Sunday September 18, 2011 @11:17PM
(#3012078)
I'm always sad that OS X doesn't support ssh-copy-id natively.
[ Parent
| on HN ]
apparently it's in homebrew (see other comment), but for half an eternity, I've always been using this:
ssh user@host "mkdir .ssh && cat >> .ssh/authorized_keys" < ~/.ssh/id_rsa.pub
(remove the mkdir if .ssh already exists)This works as well and is using nothing but the power of the unix shell and the concept of pipes.
Use mkdir -p to avoid failing if .ssh already exists.
ssh user@host "mkdir -p .ssh && cat >> .ssh/authorized_keys" < ~/.ssh/id_rsa.pubAgreed, but that's easy enough to deal with:
`brew install ssh-copy-id`
Re:SSH Tricks
by danishkhan on Monday September 19, 2011 @03:03PM
(#3014817)
man this was an awesome find for me. thank you.