Skip to content

Setup ssh keys

An SSH key is a public/private keypair used to authenticate when connecting to servers.

If you already have an SSH key, jump to use existing SSH key.

Add SSH key

Create new

If you already have a either id_ed25519.pub or id_rsa.pub within ~/.ssh/, you do not have to generate a new one. Otherwise, follow this SSH generation guide from GitHub.

Use existing

If you already have a key, either earlier generated or one has already been generated for you, simply copy it to your ~/.ssh/ folder.

Keys generated for you can be found in "CustomOffice SSH" in Bitwarden:

  • Private key should be written to ~/.ssh/id_ed25519
  • Public key should be written to ~/.ssh/id_ed25519.pub

Upload public key

Copy the content and ask a colleague to upload it to our servers e.g. cat ~/.ssh/id_ed25519.pub.

Once the key has been uploaded, you should be able to SSH to our customer servers, try ssh skave.customoffice.dk.

Add SSH config

Add or extend ~/.ssh/config with the following content:

Host *
    ServerAliveInterval 60
    CanonicalizeFallbackLocal yes
    CanonicalizeHostname always
    CanonicalDomains customoffice.dk

User root
IdentityFile "private-key-path"

Where private-key-path usually is ~/.ssh/id_ed25519 or ~/.ssh/id_rsa.

With this in place you can omit .customoffice.dk when connecting to a server, try for example ssh skave.