Andy, This is perfect thank you - I'm ended up using the following in the daemontools supervise script:
#!/bin/sh exec 2>&1 exec envuidgid rviews tcpserver -vDRHl0 0 23 ptyrun /usr/bin/bgplgsh Two more questions for you: - is it possible to set a timeout on the tcpserver/ptyrun/bgplgsh program? I want the server to disconnect the remote user after 30 seconds of inactivity. - tcpserver has a -B option to display a banner - this seems to need to be inline with the tcpserver execution. Do you know of a way to include an external file? Or even better is there a way to have ptyrun/bgplgsh display the motd? Thanks, Max On Sat, Nov 13, 2010 at 10:25 AM, Andy Bradford <amb-sendok-1292264743.jngnackkodflmlhjh...@bradfords.org> wrote: > Thus said Max Clark on Sat, 13 Nov 2010 07:54:00 PST: > >> I've experimented with tcpserver from the ucspi package without >> success. How do I give access to the bgplgsh application only via >> telnet? > > Probably because you are missing a tty. If you also install ptyget[1] > you might be able to accomplish it with something like: > > tcpserver -v 0 1234 ptyrun /usr/bin/login -f -u bgplg bgplg > > or maybe: > > tcpserver -u `id -u bgplg` -g `id -g bgplg` -v 0 1234 ptyrun /usr/bin/bgplgsh > > Andy > > [1] http://cr.yp.to/software/ptyget-0.50.tar.gz