4 ms·
This article is somewhat out of date. Modern OpenSSH distro's include 'ssh-copy-id', a single command to transfer, and append one's key to the remote list ofaut
by nailer 17y ago
This article is somewhat out of date. Modern OpenSSH distro's include 'ssh-copy-id', a single command to transfer, and append one's key to the remote list ofauthenores keys.
So:
Step 1:
ssh-genkey
Step 2:
ssh-copy-id user@host
Done.
- yan 17y agoSome operating systems, including OS X, don't provide that script, but it's easy enough to just download it: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/cvsweb/~checkout~/openssh/contrib/ssh-copy-id?rev=1.8;content-type=text%2Fplain http://www.chiark.greenend.org.uk/ucgi/~cjwatson/cvsweb/~che...
- jsonscripter 17y agossh-copy-id is great, but the connection argument must be quoted, so if you need to use a different port you must use the form: ssh-copy-id 'user@host -p1337' Took me far too long to figure this out :\
- sant0sk1 17y agoActually, step 1 is: ssh-keygen
- nailer 17y agoYou're right. I'm used to verb-noun commands, which are more popular in Unix, and the only option in Powershell.
- nocivus 17y agoThanks for the tip :)
- _pi 17y agoAlso ssh-copy-id will not work if you don't have password authentication enabled. The only way to get ssh keys on top a ssh box without password auth, is to download them with some other method.
- tdavis 17y agoStep 3: Install Keychain (http://www.gentoo.org/proj/en/keychain/ http://www.gentoo.org/proj/en/keychain/), so you can actually use a passphrase like a smart person and not have to deal with ssh-agent and ssh-add nonsense.