[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Request a PTY when running a command

Hi all,

I'm trying to execute a command with sudo. sudo requires that I provide it with an ask pass program or have a PTY.  Currently I have code that exec's a program on the remote end (called wshd, wshd exec's sudo), and then requests a PTY. This code returns an error reading "Channel request pty-req failed." If I request a PTY prior to exec'ing a command, wshd never gets exec'd. 

What I'm trying to do here is similar to `ssh -t <hostname> sudo whoami`, which exec's sudo, but also forces allocation of a PTY.

I'm using libssh 0.5.4 on RHEL 6.1. Let me know if you need more information.


William Orr

Archive administrator: postmaster@lists.cynapses.org