WalaWiki content from p1k3.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

22 lines
690 B

<[[Brennen]]> WareLogging. [http://blogs.thegotonerd.com/maelstrom/archives/000509.html Stolen] from Alan. "Transfer your ssh public key to a remote host for passwordless logins in one line":
cat ~/.ssh/id_rsa.pub | ssh hostname "cat >> ~/.ssh/authorized_keys"
Or as a script:
#!/bin/bash
cat ~/.ssh/id_rsa.pub | ssh $1 "cat >> ~/.ssh/authorized_keys"
Then just do
copykey.sh hostname
If you don't *have* a key, you'll need to do something like:
ssh-keygen
See also: http://mah.everybody.org/docs/ssh
<[Brennen]> http://www.unixwiz.net/techtips/ssh-agent-forwarding.html
<[Brennen]> Of course, you could also just use ssh-copy-id(1), if it's available.