Ssh

From Tildeverse Wiki
Revision as of 16:35, 3 June 2021 by G1n (talk | contribs) (Add article about ssh and created category guides)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Secure Shell Protocol is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with SSH.

SSH supports a handful of types of cryptographic keys. The most used are RSA and the more modern ed25519.

RSA is the de-facto standard and is supported everywhere (just choose a big enough key like 4096 bits to be secure). Ed25519 is designed to be faster and smaller withouth sacrificing security, so is best suited for embedded devices or machines with low resources. It's supported on tilde (and really on any modern system) but you may find older systems which do not support it.

Below you'll find instructions to generate either type (or both if you want).

Keep in mind that these instructions leave your private keys unencrypted in your local hard disk. So keep them private; never share them. A good solution is to provide a password for them at creation time, but this implies entering a password any time you used them (impractical) or use something like ssh-agent (a bit more complex)

Generating your keypair

Linux

  1. make sure you have a ~/.ssh directory
mkdir -m 700 ~/.ssh
  1. create your keys
ssh-keygen -t ed25519 -a 100
  1. if you press enter to accept the defaults, your public and private key will be located at ~/.ssh/id_ed25519.pub and ~/.ssh/id_ed25519 respectively
  2. cat ~/.ssh/id_ed25519.pub
  3. copy the output of the last command and paste it in the sshkey field on the signup form

Using your keypair

  1. open a terminal (this depends on your distro)
  2. ssh to your tilde:
ssh username@your.tilde