rhc ssh [No system SSH available] error

2020-02-24 04:13发布

I want view my openshift application log in my cmd. I did try :
rhc ssh appname

that time i am getting:

No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH.

My system have already ssh key.so how can i solve that problem?

5条回答
Fickle 薄情
2楼-- · 2020-02-24 04:31

You need to make sure:

  • you are in a cmd session where HOME is define (type set HOME to check its value: it must be C:\Users\yourLogin, because ssh needs to look for keys in %HOME%\.ssh)
  • your ssh.exe parent folder is referenced in the %PATH%, or you can type:

    rhc ssh -ssh "c:\prgs\git\PortableGit-2.8.3-64-bit\usr\bin\" -a appname
    

Replace c:\prgs\git\PortableGit-2.8.3-64-bit with the actual installation path of your Git for Windows.

The easiest solution is to add the git\usr\bin folder (which includes ssh.exe) to the PATH environment variable.

查看更多
Ridiculous、
3楼-- · 2020-02-24 04:33

You may want to first got to Openshift Web Console >> Settings and delete the exiting keys. Then run rhc setup in command line. Then try rhc ssh -a yourApp --ssh C:\PROGRA~1\Git\usr\bin\ssh.exe. This is what worked for me so am sharing this answer. Hope this helps. Good Luck.

查看更多
淡お忘
4楼-- · 2020-02-24 04:47

If you installed Git for Windows1, then you can try something similar to:

rhc ssh --ssh C:\PROGRA~1\Git\usr\bin\ssh.exe -a <appname>

e.g.

rhc ssh --ssh C:\PROGRA~1\Git\usr\bin\ssh.exe -a myawesomeapp

Notes

  1. See https://git-scm.com/download/win or https://git-for-windows.github.io/
查看更多
劫难
5楼-- · 2020-02-24 04:47

If you are not interested in adding your git path to PATH you will need to use a 8.3 style path because rhc can't seem to handle spaces in the path.

  • For x86 versions of git use rhc ssh myapp --ssh C:\Progra~2\Git\usr\bin\ssh.exe
  • For x64 versions of git use rhc ssh myapp --ssh "C:\Progra~1\Git\usr\bin\ssh.exe

If you leave the spaces like C:\Users\me>rhc ssh myapp --ssh "C:\Program Files (x86)\Git\usr\bin\ssh.exe"

You will get the following error:

RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Connecting to my0apps0guid@myapp-me.rhcloud.com ...
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/commands/ssh.rb:49:in 'exec': No such file or directory - C:\Prog
ram (Errno::ENOENT)
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/commands/ssh.rb:49:in 'run'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/commands.rb:294:in 'execute'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/commands.rb:285:in 'block (3 levels) in to_commander'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/command.rb:180:in 'call'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/command.rb:180:in 'call'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/command.rb:155:in 'run'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/runner.rb:421:in 'run_active_command'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/command_runner.rb:72:in 'run!'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.2.1/lib/commander/delegates.rb:12:in 'run!'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/lib/rhc/cli.rb:37:in 'start'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-1.38.4/bin/rhc:20:in '<top (required)>'
    from C:/Ruby193/bin/rhc:23:in 'load'
    from C:/Ruby193/bin/rhc:23:in '<main>'
查看更多
Viruses.
6楼-- · 2020-02-24 04:55

Install 'SSH' client like Cygwin.

A very interesting Tutorial is->>> nawab-how-to-install-ssh

查看更多
登录 后发表回答