[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Using pseudo tty with ssh results in warning

Asked by wkf in SSH / Telnet Software, C++ Programming Language

Tags: C++ pseudo-tty ssh tcgetattr

I am using ssh from my application and must pass "-t -t" to ssh in order for it to work correctly.  Otherwise, the stdin of my application is interfered with by the call to ssh.  Forcing a pseudo terminal to ssh via the -t -t avoids this issue, but instead results in the following obscure error message coming back from ssh, although the application seems to work correctly otherwise:

    tcgetattr: Inappropriate ioctl for device

I'd like to get rid of this message to keep it from happening instead of just supressing it, but am not sure why it is coming and what I should do to prevent it.  I only get the message when -t -t are passed to ssh.

Note a similar question was asked here:

  http://www.perlmonks.org/?node_id=664789

The man page for ssh says:

    -t      Force pseudo-tty allocation.  This can be used to execute arbitrary
            screen-based programs on a remote machine, which can be very useful,
            e.g., when implementing menu services.  Multiple -t options force tty
            allocation, even if ssh has no local tty.
[+][-]10/02/09 04:55 PM, ID: 25483135Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/03/09 04:03 AM, ID: 25484768Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/03/09 08:38 AM, ID: 25485725Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/03/09 08:47 AM, ID: 25485757Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/03/09 03:03 PM, ID: 25487339Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625