Hi,
I was trying to access and execute the commands on remote Linux machine of CentOs-OpenLogic. But while executing the commands with sudo option, i was getting error like tty required. My code is as follows:
New-SshSessions -ComputerName <name.cloudapp.net> -Username <name> -Keyfile <path to key file>
nvoke-SshCommand -ComputerName <name.cloudapp.net> -Command "sudo mkdir testfolder"
Remove-Sshsession
The error is "sudo: sorry, you must have a tty to run sudo", but the same script is working for Ubuntu OS. I was unable to figure out what exactly the problem was.
It is an urgent issue, please anyone help me on this.
Thanks and Regards,
Bhaskar D
I was trying to access and execute the commands on remote Linux machine of CentOs-OpenLogic. But while executing the commands with sudo option, i was getting error like tty required. My code is as follows:
New-SshSessions -ComputerName <name.cloudapp.net> -Username <name> -Keyfile <path to key file>
nvoke-SshCommand -ComputerName <name.cloudapp.net> -Command "sudo mkdir testfolder"
Remove-Sshsession
The error is "sudo: sorry, you must have a tty to run sudo", but the same script is working for Ubuntu OS. I was unable to figure out what exactly the problem was.
It is an urgent issue, please anyone help me on this.
Thanks and Regards,
Bhaskar D