Monday, 15 July 2013

osx - Running a C Server on Mac. How to Connect to it on Terminal for debugging purposes. -


Suppose I was able to execute and run the server:

/ Foo [Portno] [Args]

How do I telnet on a local machine to a server?

I tried the following:

  1. Telnet localhost [portno] error: localhost: nodename and pronouns have not been provided, or are not known

  2. Telnet [portno] Error: Try 0.1.226.65 ... telnet: Connect to address 0.1.226.65: No route to host Telnet: unable to connect to remote host

    Try it out:

      Telnet 127.0.0.1 [portno]   

    In the / private / etc / hosts you < To work for code> localhost , something like the following should be done:

      127.0.0.1 local host   

    Also, make sure Make sure that you run telnet 127.0.0.1 123 and not telnet 127.0.0.1:12223 (where 123 is the port).

No comments:

Post a Comment