You need to learn how to write network programming using Socket .
Use the socket to connect to a host by ip or resolve the ip by DNS search , and to the port 23.
Upon connect you need to parse the user input as a prompt .
It will be better to use the prompt returned by the ip ur connecting to .
Look in the MSDN for a simple socket application.
Hope u will get the idea.