Telnet Results in "Connection closed by foreign host"

I'm not a networking guy, so I apologize if my question is dumb.

I have two Ubuntu machines setup on Amazon EC2. I need to "talk" from one to the other via port 9300. On my receiving machine, I ran the following from the command-line.

netstat -ntlup | grep 9300

On my client machine, I ran the following from the command-line.

telnet [otherIPAddress] 9300

After entering that command on my client machine, I see the following printed:

Trying [otherIPAddress]...
Connected to [otherIPAddress].
Escape character is '^]'.

Then, I entered 'Hello World' at the command line. Immediately after pressing 'Enter', I see the following:

Connection closed by foreign host.

Why would I get this error? I really need to be able to get this connection running. For the life of me, I can't figure out why I can't communicate over it.


Solution 1:

This appears to be working as expected however, whatever is running on [otherIPAddress]:9300 is not expecting Hello World\n so it dropped the connection.