Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing control-C through a Telnet connection.

Status
Not open for further replies.

SgtZim

MIS
Dec 2, 2002
18
US
Hello all, hope one of you guru's can help with this.

Im setting up a linux server behind my Pix firewall that will only accept SSH telnet connections from the outside on a very limited IP allow table. Once a user successfully connects via SSH to there, they can then telnet to the various other linux/unix servers inside the company to work on.

My problem is I have an IoLan box that connects serial devices to a lan and allows telnet access into it for connecting to the individual serial devices. Several of my serial devices require a Control-C to start up once you've estalished a connection to them. When I telnet directly to the IoLan box from inside the firewall, the control-C works just fine. However, when I telneting from a linux (or unix) machine to the IoLan, the control-C kills the telnet session on the *nix box and I cannot proceed. The *nix machines will pass darn near every other control combination ok, just control-C and control-Z seem to cause problems. The Control-Z doesnt concern me much as its not needed except for interrupting screen dumps on one of the devices.

Does anyone know of a way to make a Linux machine pass a control-C on without intercepting? Even if my users have to type something else as an equivelant would be fine, Im just out of ideas.


Thanks

Zim




 
Are you sure the Control C is actually killing the telnet session or is the telnet session being dropped as a result of some other action caused by the Control C?

The reason I ask is that on all my Unix systems (Linux, Solaris and AIX) the Control C is passed through the telnet session without affecting the telnet application itself.
 
Does the same thing happen if you telnet to your Linux system from within your network, and then to your serial device? Or is it only when you come in throught the firewall?

Annihilannic.
 
Thanks for the replies so far...

Newmangi: Im not sure what you mean, whether the control C stops the telnet session or it causes every *nix box ive tried it through to drop the session as a result of some other action caused by the control C is the same thing. The telnet session stops either way. This is what im trying for work around at its root.

Annihilannic: Yes, it happens from within my network. Ive tried from inside my firewall using both SSH and regular telnet. Both exhibit the same behavior.

Ive done a bit more testing. Telnet to the serial adapter sitting right at the Unix servers will not let me even send a control C to the device. It seems only from a windows machine can I get this to work. If my path crosses any *nix machines when connecting, control C dies.
 
Strange.

Try setting 'intr' to another keyboard combination so that the UNIX system(s) don't try to trap it, i.e.

[tt]stty intr (Control-V)(Del)[/tt]

(Obviously pressing those keys and not typing the text in brackets!) That should make the 'del' key your interrupt key, and Control-C should be ignored.

Normally this isn't a problem with telnet, so I don't know what's going on. Perhaps Control-C is set to send a break from your Windows PC? You can emulate this from a UNIX-like telnet by hitting the telnet escape key sequence, usualyl Control-], and then typing 'send brk'. Try that too.

Annihilannic.
 
Thanks! Great! That worked perfectly. Although I couldnt use the del key, guess its an invalid choice. I was able to use the ^ key without issue though.

Again, Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top