SSH Kung Fu ➶

Public-Key Cryptography

This is kind of a prerequisite for supercharging ssh usage. It’s a pretty straightforward concept:

  • Generate a public key and private key. The private key can prove ownership of a public key
  • Place the public key on any servers you need to log in to
  • No more password prompts

Sound good? Let’s do it:

$ ssh-keygen -t rsa
$ cat ~/.ssh/id_rsa.pub
... your public key here ...

Paste that into the ~/.ssh/authorized_keys file of any server account you need to log in to, then any subsequent

$ ssh user@host

Will be automatic. Now you’re prepared to really make ssh useful.

And the lightweight proxy trick is great.

See also: SSH Tunnel - Local and Remote Port Forwarding Explained With Examples.

# Monday, 28 April 2014

Prior entry:
Next entry: