I have run into some problems trying to run a sudo command via the `CreateCommand` method.
I have added the user to the sudoers list and it should no longer ask for password as outlined in [this article](http://askubuntu.com/questions/281742/sudo-no-tty-present-and-no-askpass-program-specified#603223).
This works in the a putty shell terminal and appears to work if I use `CreateShell` however when trying to use the SshCommand i get the following error when running against a RedHat distro
> sudo: sorry, you must have a tty to run sudo
If I modifiy the SshCommand class to invoke `_channel.SendPseudoTerminalRequest` before `_channel.SendExecRequest` then my sudo command excutes fine (since there is actually no password required).
Is there any possibility to provide some mechanism to still set up the pty option when executing commands or is does this open the behavior up to further complications?
I have added the user to the sudoers list and it should no longer ask for password as outlined in [this article](http://askubuntu.com/questions/281742/sudo-no-tty-present-and-no-askpass-program-specified#603223).
This works in the a putty shell terminal and appears to work if I use `CreateShell` however when trying to use the SshCommand i get the following error when running against a RedHat distro
> sudo: sorry, you must have a tty to run sudo
If I modifiy the SshCommand class to invoke `_channel.SendPseudoTerminalRequest` before `_channel.SendExecRequest` then my sudo command excutes fine (since there is actually no password required).
Is there any possibility to provide some mechanism to still set up the pty option when executing commands or is does this open the behavior up to further complications?