ssh tricks

Dennis Muhlestein posted a quick ssh tip, and then a couple of really neat gems emerged in the comments. For the sake of those who didn’t click through, and my non-Utah readers, I repeat them here:

  1. ssh-copy-id is a little utility to copy your public key to a remote server. Passwordless authentication has never been easier to set up!

    ssh-keygen -t rsa
    ssh-copy-id $remote_host

  2. ControlPath reuses the same connection for subsequent logins, so if you ssh into the same server from several terminals the logins after the first happen much faster. This is a really neat trick.

    # in ~/.ssh/config
    Host *
    ControlMaster auto
    ControlPath ~/.ssh/master-%r@%h:%p


Leave a Reply