Mailing List Archive

talking to terminal servers
I think I must be missing something here. The TODO list says that
initcmd will do what I want, but I can't make it work.

The background: I want to talk to a terminal server. The session
should go something like this:

kremer:~/code/conserver $ telnet my.consoleserver.com 3022
Trying 1.2.3.4...
Connected to my.consoleserver.com.
Escape character is '^]'.

Enter Password:




Red Hat Enterprise Linux AS release 3 (Taroon Update 5)

--

and now I have a console.

Now when I try this with conserver, I try the following config:

default console { type exec;
host console;
initcmd "/opt/test/bin/chat -f /opt/test/etc/chat.cfg";
exec /usr/bin/telnet -E H P;
execsubst H=hs,P=Pd;
portbase 3000;
portinc 1;
}

console fred { include console; port 22; }

where chat is built from the conserver distribution and chat.cfg
looks like

ssword:--ssword: mypass\r

What I'd like to happen is for conserver to connect to the console
server (via telnet), run the chat script, then give me back the
console. What actually happens is that initcmd gets run before the
exec, so the console server crashes :(

How do I handle this? I've read what I can that looks relevant on the
mailing list archive and others have asked basically the same question

https://www.conserver.com/pipermail/users/2005-January/msg00001.html

but I couldn't see an answer in the archives.

Thanks in advance,

Arthur

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: talking to terminal servers [ In reply to ]
On Tue, 2005-10-25 at 10:51, Arthur Clune wrote:

> default console { type exec;
> host console;
> initcmd "/opt/test/bin/chat -f /opt/test/etc/chat.cfg";
> exec /usr/bin/telnet -E H P;
> execsubst H=hs,P=Pd;
> portbase 3000;
> portinc 1;
> }

conserver has a built-in telnet client so you shouldn't need to exec
telnet.

- Bill

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: talking to terminal servers [ In reply to ]
On 25 Oct 2005, at 16:17, Bill Sommerfeld wrote:

>
> conserver has a built-in telnet client so you shouldn't need to exec
> telnet.

Ah! Got it. Many thanks. Maybe something for the FAQ?

So for anyone searching the archives in future, this works fine:

In conserver.cf

----

default ts_server {
type exec;
host tsserver;
initcmd '/opt/test/etc/shiva-chat';
type host;
portbase 3000;
portinc 1;
}

console fred { include ts_server; port 22; }

-----

chat-shiva contains:

-----
#!/bin/sh

/opt/test/bin/chat -I -t 10 "Password: " "mypass"
-----

Many thanks,

Arthur


_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users