[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

telnet in c#

Hi,
I have coded for a telnet console but while connectiong to server (remote), I am unable to receive the message.

I am just receiving the data "SSH-2.0-OpenSSH_4.3"

But if I use putty, it gives me prompt like: "Login As", "Password:".

Then it opens a terminal.

Please help me regarding this.
0
sam000
Asked:
sam000
1 Solution
 
jimswebCommented:
A couple of suggestions:

If you have issues while connecting, It may be due to firewall. You need check both the machines, including the client you are trying to connect.

Try netstat in the server.

0
 
de2ZotjesCommented:
The putty connection you are setting up is not making a telnet connection. It is connecting using the ssh-protocol. When you use your telnet console client it is connecting to the ssh daemon, which announces itself by telling what and what version it is. A proper ssh client will start negotiating what encryption method to use for the session. Your telnet app is not doing that and the server just sits idle waiting for the client to make the next move. In contrast the putty client does negotiate an encryption method and sets up a secure communication channel after which the server presents the login prompt ( from login, the binary )

You can either recode your stuff do do ssh (the way to go) or enable telnet on the server (don't, telnet is unsafe, everything is cleartext!) and connect to telnets port(23)

0
 
sam000Author Commented:
It was helpful but partially
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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