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:

authorized_keys
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 id_rsa.pub key

id_rsa and id_rsa.pub
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/id_rsa.pub). Your private-key is for you alone, your public-key goes public. A private key looks somethoing like:

whereas a public key looks like:

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

config
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:

 

 

 

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 (privacy enhanced email, container usually hosts the public key)

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.