Bug 54770

Summary: ssh doesn't work from tty console, only from xterm if not logged in as root
Product: [Retired] Red Hat Linux Reporter: Tim Woodall <tim>
Component: opensshAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: tim
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-10-18 22:34:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Backs out one of the changes made to login.c none

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.

Using 
ssh-agent bash
ssh-add
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):
openssl00.9.6-9
openssh-* 2.9p2-8.7
glibc-* 2.2.4-19
util-linux-2.11f-11.7.1


How reproducible:
Always

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 
today)

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
ssh-add
(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 ***