Server refused to allocate pty - solved (sort of)

Richard Pyne rpyne at
Sun Feb 13 05:01:14 UTC 2005

On 11 Feb 2005 at 17:53, Richard Pyne wrote:

> On 11 Feb 2005 at 22:22, Auke Kok wrote:
> > Richard Pyne wrote:
> > > linux-2.6 with udev:
> > > 
> > > When trying to ssh in I get "Server refused to allocate pty".
> > > 
> > > I have UnixPTY enabled in the kernel, I have devpts mounted on
> > > /dev/pts (I had to manually mkdir /dev/pts).
> > 
> > no idea but if you run the daemon or the client with -v or one of
> > the other debugging options, you can probably find out a lot more
> > quickly. Try starting the daemon without -D and keeping it in the
> > foreground as well, it should prove quite worhtfull.
> Just running in debug didn't give a whole lot of useful 
> information, but the system log did show
> [sshd] error: openpty: No such file or directory
> Running under strace gave some somewhat helpful information, it 
> gave a whole series of errors like:
> open("/dev/ptya0", O_RDWR) = -1 ENXIO (No such device or 
> address)
> .
> .
> .
> open("/dev/ptyef", O_RDWR) = -1 ENXIO (No such device or 
> address)
> as it tried to open all 256 pty devices.
> The puzzling part is that they exist as links into /dev/pty/m0 
> through /dev/pty/m255 which are all device nodes of major 2 
> minor 0-255 with permissions crw-rw-rw-
> So now I see what is happening, but have no idea whay.
> Thanks for your help.

The solution is (drum roll please) udev (with the default 
configuration) does not provide /dev/ptmx (major 5, minor 2).
manually creating it solved the problem.

Now, on to the next one......

Is the 2.6 kernel with udev supposed to be using sysfs? I tried 
mounting it and then found that on a re-boot I get an "Unable to 
open initial console" and the boot hangs.

The only way I have found (so far) to recover is to boot from 
the install cd, copy the /dev directory from the cd to the hard 
drive, disable sysfs in /etc/fstab and reboot.

Any insights will be greatly appreciated.


More information about the Lunar mailing list