Skip to main content

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
    •  
  • uWe 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

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


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


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


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


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


Reply