Bug 54770 - ssh doesn't work from tty console, only from xterm if not logged in as root
Summary: ssh doesn't work from tty console, only from xterm if not logged in as root
Status: CLOSED DUPLICATE of bug 54741
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openssh
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-10-18 13:38 UTC by Tim Woodall
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2001-10-18 22:34:02 UTC

Attachments (Terms of Use)
Backs out one of the changes made to login.c (1.03 KB, patch)
2001-10-18 22:31 UTC, Tim Woodall
no flags Details | Diff

Description Tim Woodall 2001-10-18 13:38:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)

Description of problem:
Yesterday I upgraded some machines to openssh2.9p2.

ssh-agent bash
ssh <url>
Everything works as expected provided public key logon works.

however today I had to connect to a site that didn't have my public key 
installed. Instead when I do ssh <site> I get:
You have no controlling tty. Cannot read passphrase.

Version-Release number of selected component (if applicable):
openssh-* 2.9p2-8.7
glibc-* 2.2.4-19

How reproducible:

Steps to Reproduce:
openssh 2.9p2 upgraded from ftp.mirror.ac.uk mirror of update.redhat.com. 
(I also upgraded glibc, nscd and util-linux at the same time. All other 
updates have been applied previously and the problem was not seen until 

1. Ctrl-Alt-F1 (To get to a console)
2. Login (not as root)
3. ssh <somehost>

Actual Results:  You have no controlling tty.  Cannot read passphrase.

Expected Results:  loginname@<somehost>'s password: 

(Works in an xterm)

Additional info:

The following works correctly:

Ctrl-Alt-F1 (for a tty)
ssh-agent bash
(enter passphrase for private key)
ssh <somehost>
Provided the private key allows login.

(always works in an xterm)

Everything works correctly when logged in as root:
This implies it is a permissions problem:

When logged in as tim /dev/tty1 has permissions:

crw--w---- 1 tim   tty   4   1 Oct 18 14:10 /dev/tty1

however changing this to mode 666 crw-rw-rw- does not fix the problem.

Doing an ssh from a host that I have ssh into (with agent forwarding 
disabled) does bring up the "tim@<hostname>'s password: " dialog.

tty = /dev/pty/0 with the same 640 permissions.

I have confirmed this on both the other systems I have console access to 
that I upgraded yesterday. (One does not have nscd installed so this can 
probably be eliminated - I didn't expect it to be the cause anyway :-) )

Comment 1 Tim Woodall 2001-10-18 20:21:38 UTC
I have now discovered that this appears to be a problem in 
util-linux-2.11f-11.7.1 as I have just upgraded just this package on a system 
running openssh-2.5.2p2-5 which worked previously and this problem occurs.

Note that you have to log out and then log back in after upgrading before this 
problem occurs. If you are logged in before upgrading util-linux then 
everything works until you log out.

Comment 2 Tim Woodall 2001-10-18 22:31:11 UTC
Created attachment 34382 [details]
Backs out one of the changes made to login.c

Comment 3 Tim Woodall 2001-10-18 22:33:58 UTC
The patch to login.c backs out one of the changes made to login.c between 
util-linux-2.10s and util-linux-2.11f and resolves this issue.

Comment 4 Tim Woodall 2001-10-19 08:39:44 UTC

*** This bug has been marked as a duplicate of 54741 ***

Note You need to log in before you can comment on or make changes to this bug.