[Nottingham] Telnet with 'comfort shell' features for talkinjg to dumb server control programs

Dan Mackdermott nottingham at mailman.lug.org.uk
Sat Feb 15 11:02:01 2003

Hi Rob,

On Sat, 15 Feb 2003, Robert Davies wrote:
> I'm having to use ssh more onto a server in the net and then talk to various 
> client daemons over telnet.  It's not repetitive enough to automate using 
> except(1), but the lack of up-arrow and history features are driving me barmy.

You could use ssh to tunnel through to the various services using local 
port forwarding.  This may save you a good deal of time.  As far as your 
scripts are concerned, the listening port for the service is on your local 
machine since that is where you can get to the service.

> Surely someone has had this problem before?  There must be a 'pseudo-shell' 
> which does history and file completion, but punts all the commands on to the 
> tcp/ip server process you are talking to?  This would even be useful for 
> manual checking on webservers, and fixing mailer daemons, where you can 
> reload a configuration on the flie and don't have access to GUI environment.

I've come across similar problems before.  Your best bet may be to use
Perl and the Term::ReadLine interface.  You control when items get added
to the history and it may solve your problem.  Command completion may be
possible with a similar, related CPAN module (Term::Complete). Let me know
if you need a hand writing the script...



Dan Mackdermott (Director)
InputLink Consulting Ltd
t: +44 (0)115 988 1700
m: +44 (0)7980 711 557