6

I'm trying to set up Ionic pro. But it gives an error.Any help?

I have installed Git Bash.But still, it shows above error. Why?

May we proceed? Yes

ionic ssh generate C:\Users\lokuge.ssh\ionic\4460 [ERROR] Command not found: ssh [WARN] OpenSSH not found on your computer. [INFO] You will be prompted to provide a passphrase, which is used to protect your private key should you lose it. (If someone has your private key, they can impersonate you!) Passphrases are recommended, but not required. 'ssh-keygen' is not recognized as an internal or external command, operable program or batch file. [ERROR] Command not found: ssh-keygen

Sampath
  • 63,341
  • 64
  • 307
  • 441

2 Answers2

12

Simple: install SSH

Since you seem to be on Windows, I suggest getting Git Bash. That ships with OpenSSH. Oh, and Git, obviously.

Edit, because the solution is actually in the comments: You have to run whatever command is causing the error in Visual Studio from within the actual Bash shipped with Git Bash. Simply installing Git Bash but running the command from within VS does not work, as VS assumedly uses a different terminal emulator.

Oliver Baumann
  • 2,209
  • 1
  • 10
  • 26
  • 1
    I installed git bash. Still, it shows when I run `ionic link`. Why? – Sampath Oct 21 '17 at 19:39
  • What is the output of `ssh-keygen --help`? – Oliver Baumann Oct 21 '17 at 19:42
  • This `'ssh-keygen' is not recognized as an internal or external command, operable program or batch file.`. I'm running this within `vs code`. – Sampath Oct 21 '17 at 19:44
  • Try running it from the actual Git Bash terminal. Also check out https://stackoverflow.com/questions/11771378/ssh-keygen-is-not-recognized-as-an-internal-or-external-command – Oliver Baumann Oct 21 '17 at 19:45
  • Then it shows the content. But within `VS code` not working. Why? – Sampath Oct 21 '17 at 19:48
  • My guess, without ever having touched VS code, is that it isn't loading the Bash that ships with Git Bash, but instead either uses Windows' `cmd`, or some custom terminal-like implementation. Ionic, however, expects a Mac/Unix system, as it is calling `ssh-keygen`. If your `%PATH%` is setup correctly, you might be able to call `ssh-keygen.exe` from a plain `cmd`... Wrapping things up: always use Git Bash for your setup-work. – Oliver Baumann Oct 21 '17 at 19:52
  • Thanks for the support. I did it through Git bash :) – Sampath Oct 21 '17 at 20:22
0

I have the same issue, I have downloaded and configure ssh via cygwin I'm i going to use Cygwin to run ionic pro instead of cmd, because while i run ionic pro on cmd i have an error of : ionic ssh setup [WARN] OpenSSH not found on your computer. [ERROR] Command not found: ssh

Agunbiade Ademola
  • 181
  • 1
  • 1
  • 5