Permission denied errors are most likely to be caused because of an invalid read/write permission of your .ssh directory or the key files.
- Start fresh by removing all your existing ssh keys by deleting .ssh/ directory in the user’s home directory.
rm -r ~/.ssh
Delete the .openshift directory as well.
rm -r ~/.openshift
express.conffile in the .openshift directory holds the authorization details such as user logon email, so you don’t have to enter login information every time a
rhccommand is issued.
- Generate a new SSH key manually.
Make sure not to use `sudo` with either `ssh-keygen` or the `rhc setup` commands below, as this may leads to files with invalid access permissions.
ssh-keygen -t rsa -b 4096 -C "your_email_here"
- Upload the generated public key to OpenShift servers, so they can identify you as an authorized user.
Open ‘id_rsa.pub’ in a text editor and copy the content inside. Then in your OpenShift Web Console, go to `settings` > `Add a new key` and paste the content of your public key file there.
Setup your RHC client:
rhc setup and try ssh’ing into your app,
rhc ssh or
SSH url can be find under the ‘Remote Access’ section on the right pane on applications page of the web console.