2

I am trying to execute this command:

c:\openshift>rhc ssh --ssh "C:\openshift" -a demo

putty.exe is under c:\openshift and 'demo' is my application name in openshift. But why I got this error message. Does it say it can't find the putty.exe file?

C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands/ssh.rb:44:in `ex
ec': No such file or directory - C:\openshift (Errno::ENOENT)
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands/ssh
.rb:44:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands.rb:
285:in `execute'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands.rb:
276:in `block (3 levels) in to_commander'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/c
ommand.rb:180:in `call'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/c
ommand.rb:180:in `call'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/c
ommand.rb:155:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/r
unner.rb:421:in `run_active_command'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/command_runn
er.rb:73:in `run!'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/d
elegates.rb:8:in `run!'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/cli.rb:37:in
 `start'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/bin/rhc:20:in `<top
(required)>'
        from C:/Ruby200/bin/rhc:23:in `load'
        from C:/Ruby200/bin/rhc:23:in `<main>'
timo.rieber
  • 3,727
  • 3
  • 32
  • 47
marlon
  • 6,029
  • 8
  • 42
  • 76
  • How about just adding the `ssh` command to your path so that you don't have to specify the `--ssh` option? Also, you had to install Git on your machine as part of the OpenShift rhc setup didn't you? If you are using msysgit then you should have ssh.exe in the `"Program Files (x86)"\Git\bin` directory. – Mark B Sep 04 '15 at 18:29

3 Answers3

2

I got the same error. As Workaround I started to use Putty. Its works perfectly:

this video shows how to set up putty correctly:

https://developers.openshift.com/en/managing-remote-connection.html#download-the-putty-installer

Vég Béla
  • 31
  • 2
1

I solved the same problem by copying ssh.exe to a different folder (so that the path to ssh.exe does not contain spaces), and then specifying FULL PATH to ssh.exe with --ssh switch:

C:\>rhc ssh --ssh c:\ssh\ssh.exe myapp
regmagik
  • 574
  • 3
  • 14
0

Try specifying pathname the UNIX way:

rhc ssh --ssh "C:/openshift" -a demo
konsolebox
  • 72,135
  • 12
  • 99
  • 105