Re: tty question

In article
chad <cdalten@xxxxxxxxx> wrote:

On Jun 19, 4:32 pm, Icarus Sparry <use...@xxxxxxxxxxxxxxxxx> wrote:
On Fri, 19 Jun 2009 15:29:52 -0700, Chad wrote:
When I do a non-inactive login on a remote site, get some warnings that
I'm not at a terminal...

[cdalten@localhost ~]$ ssh -T cdal...@xxxxxxxxxxxx /bin/tcsh -i
cdal...@xxxxxxxxxxxx's password:
Warning: no access to tty (Bad file descriptor). Thus no job control in
this shell.
stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
uname -a
Nov  6 16:13:56 EST 2007     r...@xxxxxxxxxxxxxxxxxxxx:/usr/src/
sys/i386/compile/MNET  i386

I don't get the warning message. I mean I'm still at shell
right? I mean, when I run uname, the command gets executed on their
shell and not mine. So doesn't that mean that I'm at their tty vs my

It is a little hard to see what you are asking, because of the line wraps.

The "-T" to ssh tells it not to allocate a pseudo tty at the far end.

You probably have some commands in your startup file(s) for tcsh that are
expecting that they are run from the terminal. Things like "mesg n" for

What you have is a connection to the program's standard input and
standard output. This differs from having a connection to a pseudo tty
which is connected to the standard input and standard output in that you
do not have a layer translating characters like control-C into "send a
SIGINT to the current processes", or control-D into "tell read to return
with the current characters it has".

A good way to see what is happening is to use the "-X" flag to tcsh to
see the startup commands.

Which program is the standard input and output connect to?

They're connected directly to the TCP socket, which is connected to the
ssh client.

When you do an interactive SSH login, stdin and stdout are connected to
a pseudo-tty, which is connected to sshd on the server, which is
connected to the TCP socket, which is connected to the ssh client.

Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***