Introduction – learn some words

This explanations are meant for Linux-Systems. Well, before we dive into ssh, its time to learn some vocabulary. Let’s learn some common files related to ssh issues. Usually, you have a folder ~/.ssh in your home directory (the Tilde „~“ before the .ssh directory is a shell replacement for your home directory). Here you can find files like:

this file contains all the public keys you own from others. Compare the format of the content inside authorized_keys and compare it with the format of your key

id_rsa and
after creating a keypair (ssh-keygen) you get a private-key (which is by default stored in ~/.ssh/id_rsa) and a public-key (which lives in ~/.ssh/ Your private-key is for you alone, your public-key goes public. Private keys can have no extension but also have a .pem extension. There are also .ppk private-keys, these are created from the windows-ssh tool putty. A private key looks somethoing like:

whereas a public key looks like:

here are all servers stored that had already an established connection before.

with the file ~/.ssh/config you have a very handy config place to make ssh logins much easier. Check „man ssh_config“ for further information. If the config file does not exist you simply can create it.
Push your public-key to a server you want to communicate with:


Lets practice some commands


check details for a https certified website from the shell:


OpenSSL is a open-source version of the SSL/TLS-protocol

create a private key, a certificate signature request and a self signed certificate
create server.key

create .pem file

create server.csr (certificate signature request)

create unsigned certificate for 1 year


check if private-key fits to a certificate
you need to compare the hash-value of the certificate against the hash-value of the private-key

get the certificates hash-value

get the private-keys hash-value


remove passphrase from private key


rename certificate postfix cer to crt
you can just rename the file

Veröffentlicht unter ssh.