<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic stdin: is not a tty in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941608#M63733</link>
    <description>&lt;BR /&gt;When I send commands remotely over ssh to some Linux servers I get a message printed to stderr -- "stdin: is not a tty”. I don't want to see this message, but I want to see any other error messages printed to stderr (I want to know if I for example make a typo). So I don't want to use “2&amp;gt;/dev/null” at the end as it will hide all of the the stderr. &lt;BR /&gt;So, what is the best way to avoid the "stdin: is not a tty” message?&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;[user@server1 user]$ ssh server2 uptime&lt;BR /&gt;  5:47pm  up 35 days, 16:42,  0 users,  load average: 3.78, 3.23, 3.72&lt;BR /&gt;stdin: is not a tty&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I can add "-t" to ssh to force pseudo-tty allocation, and that will take care of the "stdin: is not a tty” message, but then I get another message that I don't want: “Connection to server2 closed.”&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;[user@server1 user]$ ssh -t server2 uptime&lt;BR /&gt;  5:49pm  up 35 days, 16:44,  1 user,  load average: 3.92, 3.51, 3.76&lt;BR /&gt;Connection to server2 closed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I also tried playing with the mesg command, but that didn’t seem to make any difference.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;Ross</description>
    <pubDate>Fri, 18 Nov 2005 02:08:25 GMT</pubDate>
    <dc:creator>Ross Minkov</dc:creator>
    <dc:date>2005-11-18T02:08:25Z</dc:date>
    <item>
      <title>stdin: is not a tty</title>
      <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941608#M63733</link>
      <description>&lt;BR /&gt;When I send commands remotely over ssh to some Linux servers I get a message printed to stderr -- "stdin: is not a tty”. I don't want to see this message, but I want to see any other error messages printed to stderr (I want to know if I for example make a typo). So I don't want to use “2&amp;gt;/dev/null” at the end as it will hide all of the the stderr. &lt;BR /&gt;So, what is the best way to avoid the "stdin: is not a tty” message?&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;[user@server1 user]$ ssh server2 uptime&lt;BR /&gt;  5:47pm  up 35 days, 16:42,  0 users,  load average: 3.78, 3.23, 3.72&lt;BR /&gt;stdin: is not a tty&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I can add "-t" to ssh to force pseudo-tty allocation, and that will take care of the "stdin: is not a tty” message, but then I get another message that I don't want: “Connection to server2 closed.”&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;[user@server1 user]$ ssh -t server2 uptime&lt;BR /&gt;  5:49pm  up 35 days, 16:44,  1 user,  load average: 3.92, 3.51, 3.76&lt;BR /&gt;Connection to server2 closed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I also tried playing with the mesg command, but that didn’t seem to make any difference.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TIA,&lt;BR /&gt;Ross</description>
      <pubDate>Fri, 18 Nov 2005 02:08:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941608#M63733</guid>
      <dc:creator>Ross Minkov</dc:creator>
      <dc:date>2005-11-18T02:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: stdin: is not a tty</title>
      <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941609#M63734</link>
      <description>did you try ssh -q option??</description>
      <pubDate>Fri, 18 Nov 2005 03:16:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941609#M63734</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-18T03:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: stdin: is not a tty</title>
      <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941610#M63735</link>
      <description>Yes, I tried "ssh -q server2 uptime" and still got the "stdin: is not a tty" message.</description>
      <pubDate>Fri, 18 Nov 2005 10:23:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941610#M63735</guid>
      <dc:creator>Ross Minkov</dc:creator>
      <dc:date>2005-11-18T10:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: stdin: is not a tty</title>
      <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941611#M63736</link>
      <description>Oh, wait... Here is the solution: use both -q and -t. I only tried them separately b4... &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example 1 -- typo in command, a "command not found" message is printed to stderr:&lt;BR /&gt;&lt;BR /&gt;[user@server1 user]$ ssh -tq server2 uptimme&lt;BR /&gt;bash: uptimme: command not found&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example 2 -- command syntax is ok and execution completes successfuly; prints result to stdout:&lt;BR /&gt;&lt;BR /&gt;[user@server1 user]$ ssh -tq server2 uptime&lt;BR /&gt;  7:25am  up 4 days, 19 min,  1 user,  load average: 10.62, 9.97, 7.86&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ross&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Nov 2005 10:31:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941611#M63736</guid>
      <dc:creator>Ross Minkov</dc:creator>
      <dc:date>2005-11-18T10:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: stdin: is not a tty</title>
      <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941612#M63737</link>
      <description>&lt;BR /&gt;Solution to the issue was to use both -t and -q:&lt;BR /&gt;&lt;BR /&gt;-q  --&amp;gt; Quiet mode. Causes all warning and diagnostic messages to be suppressed.&lt;BR /&gt;&lt;BR /&gt;-t  --&amp;gt; Force pseudo-tty allocation. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Nov 2005 10:34:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941612#M63737</guid>
      <dc:creator>Ross Minkov</dc:creator>
      <dc:date>2005-11-18T10:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: stdin: is not a tty</title>
      <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941613#M63738</link>
      <description>&lt;!--!*#--&gt;Hi all&lt;BR /&gt;&lt;BR /&gt;Try run this one&lt;BR /&gt;-----&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;TEST1=`pwd &amp;gt; /tmp/test1.txt`&lt;BR /&gt;TEST2=`ssh -tq brazil03 "cd /home/fsf/tmp/script &amp;amp;&amp;amp; pwd" &amp;gt; /tmp/test2.txt`&lt;BR /&gt;TEST1B=`cat /tmp/test1.txt`&lt;BR /&gt;TEST2B=`cat /tmp/test2.txt`&lt;BR /&gt;&lt;BR /&gt;if [ $TEST1B = $TEST2B ]; then&lt;BR /&gt;        echo WORK!!!!!!!&lt;BR /&gt;        echo $TEST1B&lt;BR /&gt;        echo $TEST2B&lt;BR /&gt;else&lt;BR /&gt;        echo DOES NOT WORK!!!!!&lt;BR /&gt;        echo $TEST1B&lt;BR /&gt;        echo $TEST2B&lt;BR /&gt;fi&lt;BR /&gt;exit 0&lt;BR /&gt;-----&lt;BR /&gt;&lt;BR /&gt;What is different?&lt;BR /&gt;When a do not use "-tq" ssh option, it work properly.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Mar 2008 13:09:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941613#M63738</guid>
      <dc:creator>Felipe Formiga</dc:creator>
      <dc:date>2008-03-19T13:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: stdin: is not a tty</title>
      <link>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941614#M63739</link>
      <description>Please, use "localhost" instead of "brazil03"</description>
      <pubDate>Wed, 19 Mar 2008 13:13:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/stdin-is-not-a-tty/m-p/4941614#M63739</guid>
      <dc:creator>Felipe Formiga</dc:creator>
      <dc:date>2008-03-19T13:13:23Z</dc:date>
    </item>
  </channel>
</rss>

