IT IS HERE! Get Smashing Node.JS on Amazon Kindle today!
Show Posts
← Back to homepage

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!

18 Comments

I get this when I try to access the file:

ucgi: system call error:
stat script: No such file or directory

Christopher Coletta said

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

    Dfd said

    some problem

Jesse Callaway said

Looks like CJ Watson has removed access to his/her CVS repo

Hello said

what a stupid thing to tell people to check out stuff from a repo…why not just post the contents of that script…

Hello said

what a stupid thing to tell people to check out stuff from a repo…why not just post the contents of that script…

    Guillermo Rauch said

    Cool :)

Jrimmer said

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

    Jrimmer said

    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.

    nerdydork said

    Thanks for the added tip.

nerdydork said

woot! Thanks!

jens said

Thanks a lot!

SungMin said

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

Paul said

Why not just use brew install ssh-copy-id?

YZ said

Brew rocks!

Your thoughts?

About Guillermo Rauch:

CTO and co-founder of LearnBoost / Cloudup (acquired by Automattic in 2013). Argentine living in SF.