16 comments

[ 2.9 ms ] story [ 43.0 ms ] thread
Why does no one ever mention ssh-copy-id?! Is part of Openssh and copies across your default pub key to the server in question.

ssh-copy-id user@server

Edit: Add more info

not sure, maybe not standard enough?

i always use it myself, so much more comfortable

because is not present in the mac default installation
But it is very easy to install if you have Homebrew and I'm guessing everyone who needs ssh-copy-id would already have homebrew installed.

Just do: brew install ssh-copy-id

Does osx not use Openssh Package? On Fedora here so had always wondered why all these setup guides included this step.. the osx thing might explain it.
Probably because the top Google result tells you to do it the way explained in this article. I did it that way for years before finding out about ssh-copy-id.
scp is another option if ssh-copy-id is not available
In a lot of environments, the SSH servers are listening on some non-standard port. I don't see an option in ssh-copy-id to specify the SSH server port.
what's next? tail(1)?
Had to upvote. Exactly my sentiments
(comment deleted)
Usually after setting up ssh RSA keys, I'll alias it to something significantly shorter. Works pretty good.
This is great!

Some other things about ssh that everyone knew but me (until I found out):

-scp supports bash completion for files on the server if you use a key pair.

-Keychain (http://www.funtoo.org/Keychain) makes having a password on your private key less of a hassle by prompting for your password when you first log in to your local account and using that when you ssh. (ssh-agent alone is similar but requires your password for every new login session).

I would love a kind of launcher for hosts in config file. Say, something like:

    ~ sshlaunch[enter]  
    Select host:  
    [0] Test1  
    [1] Test2
    [2] Test3
    Enter host number and hit enter:
This probably isn't to difficult to implement, hell I could even try to write something like that right now and put it on github. (I would have simply sent you an email but you don't have one in your profile)

EDIT: You will need python3 since I used input(), and this probably is my first python script so it's a bit messy:

https://gist.github.com/anonymous/e13d3d743c77bc1e39e6