Skip to main content
Question

Error when running .\main.ps1 -resource 'KEY' in an Upgrade [Remote]

  • December 6, 2024
  • 6 replies
  • 99 views

Dilshan Aththanayake
Sidekick (Employee)
Forum|alt.badge.img+5

Hello Experts ;

 

  • Regarding a remote Upgrade, I'm getting below error when running ‘’.\main.ps1 -resource 'KEY'’’

 

  • All these servers are remote customer servers
  • Here They asked us to use a private key file when accessing Linux server from Management server
    •  
  • [We access the Linux host from the Management server using above private key method.]
  • Cannot ssh into the Linux server manually from the Windows Management Server

 

  • Could you please support to solve this issue.

 

 

BR!

/Dilshan

6 replies

Forum|alt.badge.img+14
  • Superhero (Employee)
  • 159 replies
  • December 9, 2024

Hi Dilshan,

With SSH you can specify the private key to use with the "-i <path to private key>" option.

ssh -i <path to private key> ifs@mcihpdifsl01.d29.tes.local

However, I am not sure if we have a similar option with the main.ps1 scripts.
Most likely the default private key being used is %USERPROFILE%\.ssh\id_rsa.

Is your specified key RSA? If so, you could try 1) backing up the original id_rsa and id_rsa.pub and 2) replacing with your specified key pair, and 3) renaming to match id_rsa and id_rsa.pub.
(Make sure that you have backups to restore if necessary.)
See if this works with SSH without specifying the private key with the -i option.
If so I would expect that the main.ps1 script to work as well.

If still not working, please specify the -vvv option to the SSH command to output verbose debug information to determine where it is failing.

Best regards -- Ben


Dilshan Aththanayake
Sidekick (Employee)
Forum|alt.badge.img+5

Hi Ben;

  • Many Thanks for the input
  • Here customer asked us to use the given .ppk file to access Linux host using putty [ as per their security policies direct ssh access sis restricted]
  • As the given Key is not RSA, can we convert the given PPK key into RSA and use that for the steps you mentioned? Any thoughts?

 

BR!

/Dilshan


AshenR
Hero (Partner)
Forum|alt.badge.img+9
  • Hero (Partner)
  • 100 replies
  • December 15, 2024

Hi ​@Dilshan Aththanayake Have you tired manually generating a keypair from the Middleware server? And also can you check whether the IFS user has necessary access?

 

sudo adduser ifs

sudo usermod -aG sudo ifs

sudo usermod -a -G microk8s ifs

sudo chown -R ifs ~/.kube

 

Thanks,

Ashen


Dilshan Aththanayake
Sidekick (Employee)
Forum|alt.badge.img+5

Thank you ​@AshenR ;

  • .\main.ps1 -resource 'KEY' command succeeded after SSH connection between Management server and K8s Server has been created

 

  • Regarding 

    sudo adduser ifs

    sudo usermod -aG sudo ifs  commands;

should we enter them from path /var/snap or else?

 

 

BR!

/Dilshan


AshenR
Hero (Partner)
Forum|alt.badge.img+9
  • Hero (Partner)
  • 100 replies
  • December 19, 2024

@Dilshan Aththanayake  You can execute those commands at any place by connecting to the Middleware. 


Dilshan Aththanayake
Sidekick (Employee)
Forum|alt.badge.img+5

issue fixed after enabling direct SSH access between WMS and MTS.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings