问题
Possible Duplicate:
C# Telnet Library
I wish to do telnet programatically using C# so that once I establish the connection to the server, I can execute the commands like ls, ls -l, mv, rm.. etc on the server.
Is it possible? Are there classes in C# for this purpose similar to the classes for FTP (FtpWebRequest)? If yes, please direct me to the right approach.
When I execute ls, I need the list generated on server to be sent to the client i.e. windows machine in my case.
回答1:
Yes, here you have a telnet library http://www.codeproject.com/KB/IP/MinimalisticTelnet.aspx
来源:https://stackoverflow.com/questions/14359850/executing-commands-by-using-telnet-in-c-sharp