So a followup to my other question: https://stackoverflow.com/questions/37056763/cannot-remote-access-mysql-database-of-my-openshift-mysql-cartridge
I've tried port-forwarding as suggested here: https://stackoverflow.com/questions/19749599/openshift-how-to-remote-access-mysql but when I try
rhc port-forward -a myapp it gives me an error:
Error trying to forward ports. You can try to forward manually by running: ssh -N [email protected]
So when I execute the command it gives me another error:
Failed to add the host to the list of known hosts (/.ssh/known_hosts). Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
I tried adding my host to the known_hosts file but apparently I don't have access to the file.
I've searched for a solution and came accross this post which has the same problem: https://stackoverflow.com/questions/24113522/rhc-not-working-on-openshift-instance?ref=driverlayer.com/web but it doesn't get answered.
So I'm posting it again to find out why port-forwarding isn't working and how to fix this problem.
EDIT (extra info)
rhc setup gives me an permission denied error at the generating a token step.
Generate a token now? (yes|no) yes
Generating an authorization token for this client ... /usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir': Permission denied - /var/lib/openshift/USER/.openshift (Errno::EACCES)
ls -l ~/.ssh/known_hosts also gives me an permisson error
ls: cannot access /var/lib/openshift/USER//.ssh/known_hosts: Permission denied