Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

Telnet - disabling the echo

Hi

I'm creating a Telnet like programm.
I want to know, how can I send data to the remote telnet (the telnet to connect to me), so a string will not echo (such as in password scanarios).
I can't find where in the RFC it's defined.

Can anyone help ?

Liron
0
lirong
Asked:
lirong
1 Solution
 
ahoffmannCommented:
man ioctl
man stty
0
 
chris_calabreseCommented:
As for the RFC's, they're mum because it's not a protocol issue, but rather an issue for the host the server is running on (whether the OS thinks it should do character echo or not).
0
 
skatethereCommented:
You've probably figured this out by now, but if not...

Most telnet client/servers negotiate two options that control the state of character echo: WILL ECHO and WILL SUPPRESS GO AHEAD.

These two settings specify that each character should be sent from the client to the server, echoed by the server, and displayed on the client when the echo is received.  This reverses what the original RFC854 says about all echos being local and all transmissions been line-at-a-time.

This is done in order to allow the server to control whether or not a character is echoed (and to improve interactivity).  With these settings in place, all a server needs to do to hide a password is to not echo it.

Practially speaking, if you are running a shell on your server to interact with the client, you would call 'stty -echo' to effect this change, and then 'stty echo' to reestablish echo.

In a program, look at the termio(7) ioctl(2).

  --kirby
0
 
tfewsterCommented:
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- PAQ, no points refunded

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now