Mailing List Archive

no controlling tty
I finally figured out why I was getting this message:

geoff@newzippy:~$ ssh dammit
You have no controlling tty. Cannot read passphrase.

As root I wouldn't get this, so I figured it to be some permission
problem.

Using strace I see:
open("/dev/tty", O_RDWR) = -1 EACCES (Permission denied)
write(2, "You have no controlling tty. Ca"..., 54) = 54

then comparing the permissions on /dev/tty between the this system, and
another where I am not having the problem I see that /dev/tty wants to be
world writeable.

I don't know if this is the best case, but it seems most my boxes have
this. The system I got that didn't have this set was Essential Debian
from CheapBytes, which had similar odd settings like read-only /dev/null
and /tmp

I hope this helps.

Geoff Cummins
Re: no controlling tty [ In reply to ]
> then comparing the permissions on /dev/tty between the this system, and
> another where I am not having the problem I see that /dev/tty wants to be
> world writeable.
>
> I don't know if this is the best case, but it seems most my boxes have

It's the correct case. /dev/tty is special. It refers to your controlling
terminal. If it's not world writable I wouldn't be surprised if you saw
other problems.

On Tru64 UNIX, see man 7 tty for details. Linux? Try man 4 tty.