Re: [Vserver] pty-allocation fails, ssh fails with "stdin: is not a tty"

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Tue 02 May 2006 - 17:23:00 BST
Message-ID: <20060502162300.GI22195@MAIL.13thfloor.at>

On Tue, May 02, 2006 at 06:17:32PM +0200, Henrik Heil wrote:
> Hello list,
>
> I'm trying vservers again after some time -- sorry if this is a simple
> problem. vserver creation, start and usage from the host seems fine, ssh
> login (not startup) fails with with "stdin: is not a tty".
>
> Host:
> Ubuntu Breezy with vanilla 2.6.16
> patch-2.6.16-vs2.0.2-rc16
> util-vserver-0.30.210
>
> Guest:
> Debian Sarge, built with:
> >vserver 101 build -m debootstrap -n myskel_101 --hostname=myskel
> >--interface eth0:192.168.1.101 --force -- -d sarge
>
> testme.sh:
> >./testme.sh
> >Linux-VServer Test [V0.15] Copyright (C) 2003-2006 H.Poetzl
> >chcontext is working.
> >chbind is working.
> >Linux 2.6.16-vs2.0.2-rc16hkhl2 #1 SMP Tue May 2 16:29:13 CEST 2006 i686
> >Ea 0.30.210 273/glibc (DSa) <v13,net>
> >VCI: 0002:0001 273 03110016 (TbLgnPD)
> >---
> >[000]# succeeded.
> >[001]# succeeded.
> >[011]# succeeded.
> >[031]# succeeded.
> >[101]# succeeded.
> >[102]# succeeded.
> >[201]# succeeded.
> >[202]# succeeded.
>
> vserver start, vserver enter and apt-get install ssh works fine.
> When I try to login via ssh I get this error:
>
> >root@linux:~# ssh 192.168.1.101
> >Password:
> >stdin: is not a tty
> >
>
> /var/log/auth.log:
>
> >May 2 15:04:11 myskel sshd[6774]: debug1: Allocating pty.
> >May 2 15:04:11 myskel sshd[6774]: error: openpty: No such file or
> >directory
> >May 2 15:04:11 myskel sshd[6774]: error: session_pty_req: session 0 alloc
> >failed
>
> grep PTY /boot/config-2.6.16-vs2.0.2-rc16hkhl2
>
> >CONFIG_UNIX98_PTYS=y
> >CONFIG_LEGACY_PTYS=y
> >CONFIG_LEGACY_PTY_COUNT=256
>
> inside the vserver:
>
> >myskel:/# tree -apug /dev
> >/dev
> >|-- [lrwxrwxrwx root root ] MAKEDEV -> /sbin/MAKEDEV
> >|-- [crw-rw-rw- root root ] full
> >|-- [srw-rw-rw- root root ] log
> >|-- [crw-rw-rw- root root ] null
> >|-- [crw-rw-rw- root root ] ptmx
> >|-- [drwxr-xr-x root root ] pts
> >|-- [crw-r--r-- root root ] random
> >|-- [crw-rw-rw- root root ] tty
> >|-- [crw-r--r-- root root ] urandom
> >|-- [prw-r----- root adm ] xconsole
> >`-- [crw-rw-rw- root root ] zero

please add an 'ls -lagR /dev'

> >myskel:/# mount
> >/dev/hdv1 on / type ufs (defaults)
> >proc on /proc type proc (defaults)
> >sysfs on /sys type sysfs (defaults)
> >devpts on /dev/pts type devpts (gid=4,mode=620)

> >myskel:/# tree -a /proc/self/fd/
> >/proc/self/fd/
> >|-- 0 -> /dev/pts/6
> >|-- 1 -> /dev/pts/6
> >|-- 2 -> /dev/pts/6
> >`-- 3 -> /proc/8423/fd
>
> So I guess the problem is about the dangling symlinks/not created ptys
> under /dev/pts. I found a few small references to this and (maybe?)
> simlar problems with /dev/pts but no solution so far.

they should be created if ptmx can be reached, could
it be that the group and permissions (4, 0620) are
not appropriate for your system (pam)?

TIA,
Herbert

> Any help is appreciated.
>
> Thanks in advance,
> Henrik
>
> --
> Henrik Heil, zweipol Coy & Heil GbR
> http://www.zweipol.net/
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Tue May 2 17:23:30 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 02 May 2006 - 17:23:34 BST by hypermail 2.1.8