Solved

Managing server on windows 10 is failing when .\main.ps1 -resource 'KUBERNETES'

  • 19 October 2021
  • 4 replies
  • 872 views

Userlevel 2
Badge +5
  • Do Gooder (Employee)
  • 12 replies

Has anyone tried to use Windows 10 as a base for the cloud installation?

While .\main.ps1 -resource 'KEY' finishes successfully,  'KUBERNETES' fails. The error message seems related to ...\.ssh\id_rsa file:

Exception Occured While Opening Connection with the Linux Box.
2021-10-18 20:23:27.46   IFSCLIENT-88992 Stop Open-ConnectionsWithLinuxBox
C:\Temp\Cloud\ifsroot\main.ps1 : Error found in openssh key type: ssh-rsa is not supported. Please check logs for
details.
At line:1 char:1
+ .\main.ps1 -resource 'KUBERNETES'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,main.ps1

>>> Finalize Script Execution <«

There is nothing interesting in the ...\logs\main-script. Linux installation from OVA sits in my Oracle VM VirtualBox. I have already successfully installed database and middleware using the same ifsroot folder structure, however that was done from Windows 2019. Why on Windows 10 it is different?

icon

Best answer by Charith Epitawatta 19 October 2021, 20:00

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +31

Hi @Alex,

Please try this.

  1. Navigate to \\ifsremote\ifsroot\utils directory and find “local.psm1” file. 
  2. Take a backup of this file in case you need to restore it. Then open the file to edit.
  3. Scroll down to the function Add-KeybasedAuthWithLinuxBox
  4. Find following line(line #54) where it generates the SSH Key pair

        ssh-keygen -b 2048 -t rsa -f "$prvKeyFile" -q -N """"

  1. Change it like below by adding -m PEM option.

ssh-keygen -b 2048 -t rsa -m PEM -f "$prvKeyFile" -q -N """"

  1. Save the file and run the KEY and KUBERNETES steps again and see if you still get the error.

Hope this helps!

 

Userlevel 2
Badge +5

This worked like a dream. I wonder what impact would that have if I run it on Windows 2019 server? Would that format work too?

Userlevel 7
Badge +31

Hi @Alex,

Glad to know it worked!

This worked like a dream. I wonder what impact would that have if I run it on Windows 2019 server? Would that format work too?

All -m PEM option does is convert it to a different format, so I don’t think it would break on Windows server 2019. 

In the same local.psm1 file, I was able to find below snippet, commented out as “Helper Bash Commands”. 

As you can see, the -m PEM option is there. This looks to be a bug in Posh SSH module, which seems to be used in IFS Cloud Power Shell scripts:

https://github.com/darkoperator/Posh-SSH/issues/388

It might be a good idea to report this to R&D. 

Userlevel 4
Badge +8

Worked for me, thanks!