News for hackers. Stuff that matters.
Re:SSH Tricks by beagle3 on Sunday September 18, 2011 @11:07PM (#3012050)
The most magical command he didn't mention is 'ssh-copy-id'. If you can log-in to a host with password, you just 'ssh-copy-id myuser@thishost', supply the password once, and from that moment you can ssh with public key authentication. Extreme magic.

Also, sshfs works great, but has some issues with memory mapped files that silently lose writes. Luckily (?) most programs don't use mmap to write files, so it's not very noticeable.

All in all, ssh is one of the greatest tools.

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.
Re:SSH Tricks by pilif on Monday September 19, 2011 @04:15AM (#3012749)
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.

Re:SSH Tricks by cjp on Monday September 19, 2011 @10:04AM (#3013564)
Use mkdir -p to avoid failing if .ssh already exists.

    ssh user@host "mkdir -p .ssh && cat >> .ssh/authorized_keys" < ~/.ssh/id_rsa.pub
Re:SSH Tricks by snprbob86 on Sunday September 18, 2011 @11:49PM (#3012150)
Agreed, 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.
Re:SSH Tricks by vegardx on Monday September 19, 2011 @03:53AM (#3012723)
Since it's basically just a bash-script you can just copy it from any of the major Linux-distros. I've copied mine from Debian Lenny, and it works great.
Re:SSH Tricks by erikcw on Monday September 19, 2011 @12:15PM (#3014105)
My favorite idiom when dealing with new cloud servers is: ssh-copy-id user@host-ip <Paste random password> ssh !$

Saves copying/pasting the host ip a second time. Trivial Bash trick I know -- but it is a time saver...