Issue with numbers of pty

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with numbers of pty

Oriol Demaria-2
Trying tmuxinator here I have noticed that I ran out of pty, according
to man pty(4) there is a kernel parameter specifiying the max
number. I'm running a snapshot from last Friday, and I don't seem to
have kern.tty.maxptys.

Is this a documentation error? Or that setting is not the one to look
for?

Thanks in advance.

--
Oriol Demaria
0x58415679

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Ted Unangst-6
Oriol Demaria wrote:
> Trying tmuxinator here I have noticed that I ran out of pty, according
> to man pty(4) there is a kernel parameter specifiying the max
> number. I'm running a snapshot from last Friday, and I don't seem to
> have kern.tty.maxptys.
>
> Is this a documentation error? Or that setting is not the one to look
> for?

The sysctl was removed. The maximum is 992 and does not change.

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Stuart Henderson
In reply to this post by Oriol Demaria-2
On 2016-06-30, Oriol Demaria <[hidden email]> wrote:
> Trying tmuxinator here I have noticed that I ran out of pty, according
> to man pty(4) there is a kernel parameter specifiying the max
> number. I'm running a snapshot from last Friday, and I don't seem to
> have kern.tty.maxptys.

You probably just ran out of device nodes, the default (62) is a bit small
for some uses (often exhibited as not being able to open new xterms), but you
can create more like this:

cd /dev
sh MAKEDEV pty1

If you need even more, you can do pty2,...pty15, you get 62 for each number
(0 is /dev/ptyp[0-9a-zA-Z], 1 is ptyq*, etc).

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Oriol Demaria-2
Yes, that was the issue. Thank you very much :)

Stuart Henderson <[hidden email]> writes:

> On 2016-06-30, Oriol Demaria <[hidden email]> wrote:
>> Trying tmuxinator here I have noticed that I ran out of pty, according
>> to man pty(4) there is a kernel parameter specifiying the max
>> number. I'm running a snapshot from last Friday, and I don't seem to
>> have kern.tty.maxptys.
>
> You probably just ran out of device nodes, the default (62) is a bit small
> for some uses (often exhibited as not being able to open new xterms), but you
> can create more like this:
>
> cd /dev
> sh MAKEDEV pty1
>
> If you need even more, you can do pty2,...pty15, you get 62 for each number
> (0 is /dev/ptyp[0-9a-zA-Z], 1 is ptyq*, etc).


--
Oriol Demaria
0x58415679

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Ted Unangst-6
In reply to this post by Stuart Henderson
Stuart Henderson wrote:

> On 2016-06-30, Oriol Demaria <[hidden email]> wrote:
> > Trying tmuxinator here I have noticed that I ran out of pty, according
> > to man pty(4) there is a kernel parameter specifiying the max
> > number. I'm running a snapshot from last Friday, and I don't seem to
> > have kern.tty.maxptys.
>
> You probably just ran out of device nodes, the default (62) is a bit small
> for some uses (often exhibited as not being able to open new xterms), but you
> can create more like this:
>
> cd /dev
> sh MAKEDEV pty1

This shouldn't be a problem for software using openpty().

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Todd C. Miller
On Fri, 01 Jul 2016 10:50:24 -0400, "Ted Unangst" wrote:

> Stuart Henderson wrote:
> > On 2016-06-30, Oriol Demaria <[hidden email]> wrote:
> > > Trying tmuxinator here I have noticed that I ran out of pty, according
> > > to man pty(4) there is a kernel parameter specifiying the max
> > > number. I'm running a snapshot from last Friday, and I don't seem to
> > > have kern.tty.maxptys.
> >
> > You probably just ran out of device nodes, the default (62) is a bit small
> > for some uses (often exhibited as not being able to open new xterms), but y
> ou
> > can create more like this:
> >
> > cd /dev
> > sh MAKEDEV pty1
>
> This shouldn't be a problem for software using openpty().

I don't think that is correct.  You still need to device nodes in
/dev to exist.  Otherwise, the PTMGET ioctl will fail.

 - todd

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Ted Unangst-6
Todd C. Miller wrote:

> On Fri, 01 Jul 2016 10:50:24 -0400, "Ted Unangst" wrote:
>
> > Stuart Henderson wrote:
> > > On 2016-06-30, Oriol Demaria <[hidden email]> wrote:
> > > > Trying tmuxinator here I have noticed that I ran out of pty, according
> > > > to man pty(4) there is a kernel parameter specifiying the max
> > > > number. I'm running a snapshot from last Friday, and I don't seem to
> > > > have kern.tty.maxptys.
> > >
> > > You probably just ran out of device nodes, the default (62) is a bit small
> > > for some uses (often exhibited as not being able to open new xterms), but y
> > ou
> > > can create more like this:
> > >
> > > cd /dev
> > > sh MAKEDEV pty1
> >
> > This shouldn't be a problem for software using openpty().
>
> I don't think that is correct.  You still need to device nodes in
> /dev to exist.  Otherwise, the PTMGET ioctl will fail.

oh, my bad. I thought ptm would create the pty nodes as needed, but apparently
not.

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Theo de Raadt
> Todd C. Miller wrote:
> > On Fri, 01 Jul 2016 10:50:24 -0400, "Ted Unangst" wrote:
> >
> > > Stuart Henderson wrote:
> > > > On 2016-06-30, Oriol Demaria <[hidden email]> wrote:
> > > > > Trying tmuxinator here I have noticed that I ran out of pty, according
> > > > > to man pty(4) there is a kernel parameter specifiying the max
> > > > > number. I'm running a snapshot from last Friday, and I don't seem to
> > > > > have kern.tty.maxptys.
> > > >
> > > > You probably just ran out of device nodes, the default (62) is a bit small
> > > > for some uses (often exhibited as not being able to open new xterms), but y
> > > ou
> > > > can create more like this:
> > > >
> > > > cd /dev
> > > > sh MAKEDEV pty1
> > >
> > > This shouldn't be a problem for software using openpty().
> >
> > I don't think that is correct.  You still need to device nodes in
> > /dev to exist.  Otherwise, the PTMGET ioctl will fail.
>
> oh, my bad. I thought ptm would create the pty nodes as needed, but apparently
> not.

That would be a little strange.  Even just thinking of the first special case
(chroot) makes me feel uneasy.

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Gabriel Nieto
Theo de Raadt <deraadt <at> cvs.openbsd.org> writes:

>
> > Todd C. Miller wrote:
> > > On Fri, 01 Jul 2016 10:50:24 -0400, "Ted Unangst" wrote:
> > >
> > > > Stuart Henderson wrote:
> > > > > On 2016-06-30, Oriol Demaria <sysadmin <at> the-grid.xyz> wrote:
> > > > > > Trying tmuxinator here I have noticed that I ran out of pty,
according
> > > > > > to man pty(4) there is a kernel parameter specifiying the max
> > > > > > number. I'm running a snapshot from last Friday, and I don't seem to
> > > > > > have kern.tty.maxptys.
> > > > >
> > > > > You probably just ran out of device nodes, the default (62) is a
bit small
> > > > > for some uses (often exhibited as not being able to open new
xterms), but y

> > > > ou
> > > > > can create more like this:
> > > > >
> > > > > cd /dev
> > > > > sh MAKEDEV pty1
> > > >
> > > > This shouldn't be a problem for software using openpty().
> > >
> > > I don't think that is correct.  You still need to device nodes in
> > > /dev to exist.  Otherwise, the PTMGET ioctl will fail.
> >
> > oh, my bad. I thought ptm would create the pty nodes as needed, but
apparently
> > not.
>
> That would be a little strange.  Even just thinking of the first special case
> (chroot) makes me feel uneasy.
>
>

Open pty´s without limits is something I hope a long time ago. I use Authpf
for securing a large network and need to overcome the limit of 992 ptys . I
refuse to use FreeBSD to overcome this limit .
Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Stuart Henderson
On 2016-07-01, Gabriel N <[hidden email]> wrote:
> Open pty´s without limits is something I hope a long time ago. I use Authpf
> for securing a large network and need to overcome the limit of 992 ptys . I
> refuse to use FreeBSD to overcome this limit .

See PermitTTY in sshd_config(5).

Reply | Threaded
Open this post in threaded view
|

Re: Issue with numbers of pty

Gabriel Nieto
Stuart Henderson <stu <at> spacehopper.org> writes:

>
> On 2016-07-01, Gabriel N <gabnietof <at> gmail.com> wrote:
> > Open pty´s without limits is something I hope a long time ago. I use Authpf
> > for securing a large network and need to overcome the limit of 992 ptys . I
> > refuse to use FreeBSD to overcome this limit .
>
> See PermitTTY in sshd_config(5).
>
>
Authpf does not work without pty (PermitTTY no) , but the question isn´t
pty vs no pty.
PTY is Important for many reasons. It permit monitoring and controlling
terminal session . If you need a SSH server for thousands users and your
server hardware is powerful to bear it, this limit is a handicap.