Wermescher Advisory Logo

3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id


Step 1: Create public and private keys using ssh-key-gen on local-host

On your local machine you need to create ONCE the ssh key-pair:

ssh-keygen -o -t rsa -C "herwart@wermescher.com" -b 4096 -N '' -f $HOME/.ssh/id_rsa


Copy the public key to remote-host using ssh-copy-id

ssh-copy-id -i ~/.ssh/id_rsa.pub RemoteHost


you need to enter the password of the remote host once.

Login to remote-host without entering the password

ssh remote-host



Fix offending key in local store

change the linenumber resp. the ip address before applying the command below

remove 10th line:

sed -i '10d' ~/.ssh/known_hosts


GIT key

If you already have ssh key on your machine then type the following command to retrieve the public key:

cat ~/.ssh/id_rsa.pub


Otherwise type:

ssh-keygen -o -t rsa -C "herwart@wermescher.com" -b 4096


Enter passphrase and store it in the keypass file.!

Now type:

cat ~/.ssh/id_rsa.pub


On Gitlab

Go to GitLab pages and navigate to the ‘SSH Keys’ tab in your ‘Profile Settings’. Paste your key in the ‘Key’ section



and give it a relevant ‘Title’. Use an identifiable title like ‘Work Laptop – Windows 7’ or ‘Home MacBook Pro 15’.

If you manually copied your public SSH key make sure you copied the entire key starting with ssh-rsa and ending with your email.

On GitHub

Click on your profile picture (top right) and select “Settings”.
On the Menu on the left side you see „SSH and GPG keys.
You can store your public key there.


copy from server

rsync ???

Weitere Posts
Facebook Auftritt 101

Alle meine Notizen zu einem Facebook Auftritt für die Person und für dessen Seiten. Profilbild Das Profilbild wird am PC auf Deiner Seite mit 200×200

Sende uns eine Nachricht