Telnet integration question

Hello,

I would like to manage a device with telnet integration. My device permits only one Telnet session on time. So if I would like to create several switchs to manage this device, only the first one create a tcp/ip socket on port 23 and the second one is refused with an TCP reset Flag.

My question is : Is it possible with telnet integration to close the tenet session until the job is done to allow the second one to connect. Or is it possible to manage a sequence ?

Thx for your help
Christophe

Have you consider to use socat instead ?
Something like this:

echo "Command" | socat - TCP:ip-address:port,crlf

If you make the switches activate an automation that do the Telnet, then you use the automation mode Queued.