wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes Cannot connect to telnet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Cannot connect to telnet" Watch "Cannot connect to telnet" New topic
Author

Cannot connect to telnet

Alan Blass
Ranch Hand

Joined: Mar 21, 2010
Posts: 119
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

Joined: Oct 29, 2001
Posts: 8836
    
    7

Putty can be used for both SSH and Telnet. Are you trying to telnet to the SSH port?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cannot connect to telnet
 
Similar Threads
Problem with Whois port on the InterNIC Server
What do i need to do java.net.connectexception connection refused connect
java.rmi.ConnectException: Connection refused to host
java.net.ConnectException: Connection refused: connect
Exception in Pooling