I am using rhc
cli tool for OpenShift projects and have encountered a problem with default rhc
ssh key.
On any ssh related action (setup, app-create, etc..) rhc
creates ~/.ssh/id_rsa
key if it does not exist. I do not like that behaviour, and I would like it to use something like ~/.ssh/my_openshift
key.
I have added ssh_key_file='~/.ssh/my_openshift'
to the ~/.ssh/express.conf
, but it does not help.
So, the question is;
- how I can configure rhc tool to use custom ssh-key?
Note: I know how to add additional ssh key, but I would like to stop rhc creating/using ~/.ssh/id_rsa
UPDATE 1
Unfortunately King-Wizard (deleted) answer did not answer my question because:
Answer does not figure - is it possible or not to make
rhc
ignore the~/.ssh/id_rsa
during setup.In my opinion, the main problem - if we are using several apps that requires default ssh key (
id_rsa
), that will add mess in controlling of ssh keys.Temporary fix, that I have found, is creating an empty
id_rsa
file and blocking write access to it. So:- Nothing can use
id_rsa
correctly - this is how we will catch apps with unhealthy attempt to useid_rsa
. And it is good for me, because I do not useid_rsa
key at all. rhc
sees thatid_rsa
exists, and do not try to create its own duringrhc setup
.rhc
cannot useid_rsa
, so it uses additional keys added viarhc sshkey
add somekey_
- Nothing can use
My solution is not the best, because it also create mess, but less than shifting keys with bash commands. In my opinion, Better solutions are:
- Check if original
rhc
supports custom default keys throughexpress.conf
- If original
rhc
doesn't supports that, fix and send patch to the community =)
- Check if original