• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot connect to telnet

 
Alan Blass
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I am trying to connect via telnet. I have specified the IP addres and the port number.

telnet.connect(<ipaddress>, <portNumber>);

But I get

java.net.ConnectException: Connection refused: connect

But I can connect using putty using the same ip address and port.

How can I troubleshoot the java connection refused error?

Thanks
 
Joe Ess
Bartender
Posts: 9314
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Putty can be used for both SSH and Telnet. Are you trying to telnet to the SSH port?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic