There’s a very convenient shell script bundled with some distributions of OpenSSH called ssh-copy-id. It seems not to be the case with Leopard’s SSH.
In order to get it, we can simply check it out of a SVN repository. Execute this two commands:
sudo curl "http://www.chiark.greenend.org.uk/ucgi/~cjwatson/cvsweb/openssh/contrib/ssh-copy-id?rev=1.8;content-type=text%2Fplain" -o /usr/bin/ssh-copy-id
sudo chmod +x /usr/bin/ssh-copy-id
And you’re done!
if ( comments_open() ) { ?>
18 Comments
I get this when I try to access the file:
ucgi: system call error:
stat script: No such file or directory
Error msg: (from MA OS 10.6.5)
/usr/bin/ssh-copy-id: line 1: ucgi:: command not found
stat: script:: stat: No such file or directory
stat: No: stat: No such file or directory
stat: such: stat: No such file or directory
stat: file: stat: No such file or directstat: or: stat: No such file or directory
stat: directory: stat: No such file or directory
some problem
Looks like CJ Watson has removed access to his/her CVS repo
what a stupid thing to tell people to check out stuff from a repo…why not just post the contents of that script…
what a stupid thing to tell people to check out stuff from a repo…why not just post the contents of that script…
Cool :)
For those that wandered here via search engine, the command line given yields a kind of 404/500. Using the official Mercurial repo try the following commandline:
sudo curl “http://hg.mindrot.org/openssh/raw-file/c746d1a70cfa/contrib/ssh-copy-id” -o /usr/bin/ssh-copy-id
Don’t blindly copy and paste the given URL as the blog software shortened it out from under me. Instead use the given commandline but paste in the URL from the clickthrough/mouseover.
Thanks for the added tip.
woot! Thanks!
Thanks a lot!
Thanks! I just put your codes in gist.
gist https://gist.github.com/1639381
can get
curl ‘https://raw.github.com/gist/1639381/eea46277ba544fcbd0a0768e8b3f854880ddb772/ssh-copy-id’ -o ssh-copy-id
Why not just use brew install ssh-copy-id?
Pingback: Whoila Blog » Blog Archive » Get SSH working on OS X using
Brew rocks!
Pingback: Get ssh-copy-id in Mac OS X Lion | Jose Manuel Prieto Palacios