Re: tty question



In article
<84da2100-2b00-40f6-858b-5f43396d7af5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
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
FreeBSD m-net.arbornet.org 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Tue
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 arbornet.org 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
tty?

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
example.

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 ***
.



Relevant Pages

  • Re: tty question
    ... no access to tty. ... stty: stdin isn't a terminal ... which is connected to the standard input and standard output in that you ...
    (comp.unix.shell)
  • Re: looking for thread about backup using ssh -T
    ... If stdin is not a tty, ... allocation, and that only happens if stdin is a tty. ... incantation because it has less opportunity to seem magic or be treated ...
    (Fedora)
  • Re: rfcomm problems
    ... > the problem is that the connection works ... > only if i start rfcomm_sppd on a TTY, ... > does not work properly as the bluetooth modem ... i should probably fix it just to avoid confusion. ...
    (freebsd-current)
  • Re: Reconnect to a specific TTY session?
    ... I get a new TTY session. ... I don't know if you can reconnect to the old tty (if ssh noticed the ... connection went away it should SIGTERM its children, ...
    (Debian-User)
  • Re: detect batch mode in Tcl shell
    ... seems to correspond ro what tcl_interactive reports. ... stdin is a TTY. ... the real equivalent to that check ... will look different if the terminal is a TTY. ...
    (comp.lang.tcl)