Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

unable to use sudo Linux with CentOS

$
0
0

Hi,

I have requirement of creating the Linux vm with CentOS-OpenLogic in azure and i have to install some start up programs while provisioning, through PowerShell.

I'm using SSH-Sessions module to accomplish the task.

My code as follows

New-SshSessions -ComputerName <name.cloudapp.net> -Username <name> -Keyfile <path to key file>

       Invoke-SshCommand -ComputerName <name.cloudapp.net> -Command "sudo mkdir testfolder"

Remove-Sshsession

But i'm getting sudo error. "sudo: sorry, you must have a tty to run sudo"

When I'm executing the same command using putty, it is working fine. The same code is working for azure ubuntu 13.10 through powershell and putty as well. Having the problem with CentOS-OpenLogic only

Please any one help me on this.

Thanks in adavnce

Bhaskar.D


Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>