6

There already a lot of topics about it. But I'm stuck

I configured ssh with succes!

SSH

Now I like to configure the portforwarding for connection with TOAD. I used this tut: https://blog.openshift.com/getting-started-with-port-forwarding-on-openshift/

Now when I try rhc port-forward -a php

I get this error Could not parse PKey: no start line

Port Forward

I founded this: http://blog.skypayjm.com/2015/02/accessing-remote-openshifts-database.html

I tried to downgrade ssh, but it didn't change anything.

Does somebody know what I do wrong? Sincerely, Brecht

ErazerBrecht
  • 1,583
  • 2
  • 20
  • 37

2 Answers2

8

You are probably using the beta version of the net-ssh gem. You need to install version net-ssh (2.9.2), and remove 2.9.3-beta1.

You can see what version of the net-ssh gem you are using with the following command:

gem list net-ssh

The results should look like this:

$gem list net-ssh

*** LOCAL GEMS ***

net-ssh (2.9.2)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0)
  • Thanks, I did installed multiple versions. But I forgot to remove the old (newer) ones. Many thanks! It works now – ErazerBrecht Feb 23 '15 at 20:31
  • windows 10, ruby 2.2 not working - installed ruby 1.9.3 and it started to work like a charm – Michal Bernhard Nov 02 '15 at 19:32
  • @coreydaley, I've followed this solution and when I've uninstalled *net-ssh 2.9.3-beta1* now I can't call `C:\Users\Igor\laravel5>rhc ssh` the error is: `C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- dl/impo rt (LoadError) ...`. How to fix it? – Igor Savinkin Oct 19 '16 at 11:45
4

I had the same problem and was caused by the version of ruby that i had installed . I uninstalled Ruby 2.2.1 (x64) and install 1.9.3 and now works fine.

The instructions tell : install the last version. This cause me a problem with libraries and I had to install 2.9.3-beta1 to fix it but also will create a problem with "rhc fordward" command and could not fix uninstalling 2.9.3-beta1 cause provoke the library problem XD) [https://developers.openshift.com/en/getting-started-windows.html#client-tools][1]

The instructions also tell:

"If you are not sure which version to install, it is recommended to use the latest 1.9.3 installer"

Michal Bernhard
  • 3,853
  • 4
  • 27
  • 38
Rafa
  • 41
  • 1