Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Created Unassigned: pseudo-tty in SshCommand [2694]

$
0
0
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?

Viewing all articles
Browse latest Browse all 1026

Trending Articles



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