⇤ ← Revision 1 as of 2009-06-27 18:58:43
Size: 845
Comment:
|
Size: 845
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 24: | Line 24: |
CategoryCheetSheet | CategoryCheatSheet |
Copy an SSH public key to a remote machine
This:
1 cat ~/.ssh/id_rsa.pub | ssh remoteuser@remotehost 'mkdir .ssh ; shat >> .ssh/authorized_keys'
will copy a public key to a remote machine, but most likely you want to use ssh-copy-id included with recent versions of OpenSSH.
Protect sshd from kernel OOM events
The kernel out-of-memory killer kills processes when a system runs out of RAM. Killing SSH typically does not help fix anything, and makes remotely-accessible systems inaccessible.
This is done by a few distributions, but when working on an arbitrary remote machine may be useful to run just in case.