There is an ssh key ~/.ssh/openshift_id .

How to teach intellij idea to use it, but not ~/.ssh/id_rsa ?

  • one
    Idea most likely does not use any keys, providing this ssh task. Create a file ~.ssh/config : Host example Hostname example.com IdentityFile /home/user/.ssh/openshift_id User xxxx Port xxxx Any of the above fields are optional, as far as I remember, specifying Host example.com and IdentityFile will be enough And do not forget to put 600 rights to the private key and 700 to .ssh - etki
  • Only not Hostname, but HostName, as far as I remember, this is important. - etki
  • @Etki nivajna) - strangeqargo

1 answer 1

The inetlij-idea program probably does not “ handle ” the keys.

you need to configure the ssh client as necessary.

To do this, add two lines to ~/.ssh/config :

 host имя-или-ip-адрес identityfile ~/.ssh/openshift_id 

where имя-или-ip-адрес is the name or ip-address of the host, when connecting to which you need to use this key. for example, github.com .

and do not forget to remove any access by everyone except you to the ~/.ssh and its contents:

 $ chmod -R go= ~/.ssh