Remoting into a Centos VM - sudo user with no pwd not working from PowerShell script RRS feed

  • Question

  • I am connecting remotely to a Centos 7.5 VM in Azure - it works fine for commands not requiring sudo privileges

    My user has been configured to accept sudo commands with no password (i.e. I can run ls -la /root with no password provided) but this does not work when connecting from my PowerShell script - which looks like this:

    &($plinkpath + "plink.exe") $username@$servername $command  .. I also tried:

    &($plinkpath + "plink.exe") -pw $password $username@$servername $command

    The error I get is essentially asking for me to provide a password interactively via keyboard:

    plink.exe : -- Keyboard-interactive authentication prompts from server

    Any thoughts how to resolve this?  Thanks.


    Wednesday, August 14, 2019 11:35 PM


  • For this you need to ask in a Putty forum. This is not a PowerShell issue. 


    • Marked as answer by ChrisBirmele Thursday, August 15, 2019 12:16 AM
    Thursday, August 15, 2019 12:01 AM