Register private keys for server

To set the private ssh key file for git requests to a specific server you can edit/create the default private config file ~/.ssh/config:

Host git.server1.de
    IdentityFile ~/.ssh/private_key1
Host git.server2.de
    IdentityFile ~/.ssh/private_key2

Make sure the keys file is only readable by the user itself

chmod 0600 ~/.ssh/private_key1

Otherwise you'll get a "Permissions #### for '/path/to/file' are too open" error.

This page was last edited on 2024-03-26 09:21

Powered by Wiki|Docs

This page was last edited on 2024-03-26 09:21

Bjørn Singer
Private wiki!

Powered by Wiki|Docs