connecting to Telnet through C#
Any help on this would be greatly appreciated.
Thanks in advance
Any help on this would be greatly appreciated.
Thanks in advance
You are exactly right. Telnet is one of those ridiculously simply things that for the most part is just an open port... the authentication though is something else completely as that is up to the shell that you are accessing, not so much the telnet protocol itself.
Are you receiving any data in your client from the server?
TcpClient telnet = new TcpClient("10.5.6.59", 23);
NetworkStream telnetStream = telnet.GetStream();
StreamWriter output = new StreamWriter(telnetStream);
StreamReader input = new StreamReader(telnetStream);
And I try to read from the stream and it gives me: #'$
when I just do a Console.Write to what is read into my buffer in the input.Read() call.
On a side note, do you have any idea how to do the authentication? or how to figure out a way to do it? Because since you said that I am guessing that sending in a username/password over the Socket doesnt authenticate me at all and thus I am really not even connected to anything.
I don't know if any of what I said made much sense, sorry if I just confuse you more.
I appreciate the help though