Announcement

Collapse
No announcement yet.

Using Telnet

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Telnet

    I have been trying to use telnet to connect to my other computer and I'm not sure if I'm doing it correctly, or what I'm doing wrong.

    The machine I'm trying to connect with is running Vista Business and I have enabled telnet client and server (although I don't think server was needed, I'm not sure)

    The machine I'm trying to connect to is a Macbook Pro that duel boots with XP. I did nothing to enable telnet server on it.

    When I type in cmd "telnet xxx.xxx.xx.xx yyyy" (where the x's are the IP of the computer I want to connect to and the y's are the open port) I get a blank screen. At the top bar it says "telnet xxx.xxx.xx.xx" and as soon as I type any character it brings me back to the original cmd.

    Where am I going wrong?

    Thanks,
    Spots

  • #2
    Re: Using Telnet

    From my understanding:

    You are on a Vista machine with a Telnet client and server installed, trying to connect to a Macbook Pro with WinXP that doesn't have a Telnet client or server installed.

    My opinion on this is that you should install a Telnet service on the Macbook Pro (XP) and enable the firewall to let through data on the port that the Telnet service is running on (Typically port 23).

    I'm not too sure on Macbooks or the Mac OS, but I think they use SSH. I'm not sure if you can run Telnet on it, but I'm sure if you search "Mac Telnet Service" in google something will come up.

    Adding to that a Telnet client might be able to tell you if a port is open. If the connection times out then the IP/port is not open, if it gives you a blank screen with a cursor or some text it means that port is open.
    Example: telnet google 80
    However, there are better ways to search for open ports.

    Hope that helps,

    R Austin
    Last edited by RAustin; 22nd April 2009, 01:54.

    Comment


    • #3
      Re: Using Telnet

      You don't need a telnet server running on either machine and you only need a telnet client on the Vista machine. The Mac/XP machine needs to be listening for incoming connections on the port you're trying to connect to. What service or process is running on that port? Does the service/process support incoming connections from remote hosts? Is the firewall on the Mac/XP machine blocking the incoming connection?

      When you telnet to port 25 on an email server or port 80 on a web server it's because those services support incoming connections on those ports from remote hosts. Google is not running a telnet server in their web server farm for incoming connections from remote hosts on port 80, they are running web server software that supports incoming connections from remote hosts, that's why you can connect to them using telnet. When you connect to them using telnet you're basically using a command shell to connect and then you have to pass valid HTTP commands or nothing will happen. It's the same for SMTP, POP, FTP, etc.

      Comment


      • #4
        Re: Using Telnet

        RAustin-

        Yes when I just type in "telnet xxx.xxx.xx.xx" it says it cannot connect to port 23. I used zenmap to find open ports. Also, if you could point me in the direction of better ways of finding open ports that would be helpful.

        Also I googled mac telnet service and it seems that you can enable it. But for this purpose I want to connect to the computer booted into XP. In vista I had to enable the telnet server to be able to use it. Would I have to enable the telnet client and/or server on the XP computer? And finally what option allows remote connections through the standard windows firewall?

        joeqwerty-

        How do I get the machine to listen for connections on any ports? Also, how do I check to see what process is running on the port? I had used zenmap to find open ports. From what I had previously understood was that all I needed was an open port on the remote computer but maybe that's not the case?

        Thanks for responding,
        Spots

        Comment


        • #5
          Re: Using Telnet

          You only need to install the telnet server if you want to connect to the server and run remote commands. If you have a service, program, or process running on a server and it supports "command line" type functions you do not need to install the telnet server.

          For instance if I run the command: telnet mail.microsoft.com 25, this will connect to the SMTP service running on the server mail.microsoft.com. I can then issue SMTP protocol commands from the telnet client window, such as HELO, MAIL FROM, RCPT TO, etc., etc. This does not require that a telnet server be running on the server mail.microsoft.com.

          Run "netstat -a -b -n -o" from a command line on the server, this will tell you what processes are listening on what ports.

          What service, program, or process is it that is supposed to listen on this particular port? Does the service/program/process support command type functions? Not all services/programs/processes support command type functions. For instance, I have a terminal server that allows incoming RDP connections to port 3389 but if I telnet to this server on port 3389 nothing will happen because there are no command line functions for RDP.

          Comment


          • #6
            Re: Using Telnet

            Ok I think I'm slowly getting it...

            I typed in that command, but for "netstat -b" it said "The requested operation requires elevation." And I have no idea what that means. The other commands worked.

            Although if I type in " netstat -an |find /i "listening" " that lists all the ports that are listening. It looks a lot like this:

            TCP 0.0.0.0.xxx 0.0.0.0 LISTENING
            TCP 0.0.0.0.xxxx 0.0.0.0 LISTENING

            ............ect...........

            then there are a couple that look like:

            TCP [::]: xxxx [::]:0 LISTENING

            Once again I'm not sure what all that means, but is this what I am looking for? Are any of those what I am looking for?

            Comment


            • #7
              Re: Using Telnet

              No that's not what you're looking for. Also, the message about requiring elevated permissions means that you are not logged onto the computer with an admin account.

              Try running netstat -a and post the results here.

              Comment


              • #8
                Re: Using Telnet

                Ok will do thanks. But real fast how do I send output to a file?

                I thought it was "netstat -a > stuff.txt"

                But that's not working

                Comment


                • #9
                  Re: Using Telnet

                  You have to give it a full path like: netstat -a >C:\stuff.txt

                  Comment


                  • #10
                    Re: Using Telnet

                    I don't know why but that's not working for me. It's supposed to create a new file if it doesn't exist or overwrite and existing one. I tried:

                    netstat -a > C:\Users\Spots\Documents\stuff.txt

                    netstat -a > C:\stuff.txt

                    I guess I can just type everything that comes up?
                    Last edited by Spots; 22nd April 2009, 05:20.

                    Comment


                    • #11
                      Re: Using Telnet

                      Actually would you mind if I emailed you a jpeg screenshot on what the output was?

                      What is it I am looking for?

                      Comment


                      • #12
                        Re: Using Telnet

                        Originally posted by Spots View Post
                        RAustin-

                        Yes when I just type in "telnet xxx.xxx.xx.xx" it says it cannot connect to port 23. I used zenmap to find open ports. Also, if you could point me in the direction of better ways of finding open ports that would be helpful.

                        Also I googled mac telnet service and it seems that you can enable it. But for this purpose I want to connect to the computer booted into XP. In vista I had to enable the telnet server to be able to use it. Would I have to enable the telnet client and/or server on the XP computer? And finally what option allows remote connections through the standard windows firewall?

                        joeqwerty-

                        How do I get the machine to listen for connections on any ports? Also, how do I check to see what process is running on the port? I had used zenmap to find open ports. From what I had previously understood was that all I needed was an open port on the remote computer but maybe that's not the case?

                        Thanks for responding,
                        Spots
                        Spots,
                        NMAP is my choice of program too.

                        I think, and I may be wrong here but what you need to do is to start the Telnet service (it can be found using Run>servces.msc) on your Windows XP system. To test if the service is running, on the XP machine run telnet 127.0.0.1

                        For a remote connection from another system you will most likely have to add an exception for port 23 to the firewall if you have one and it's enabled (You could disable a firewall for testing).

                        In addition, I think (again i may be wrong) but joeqwerty wants you to run netstat on the XP machine the one you are trying to telnet into. The message you are getting about elevated privileges and the paths you have (c:/users...) indicated to me you are running netstat on the vista machine.

                        Regards,

                        R Austin

                        Comment


                        • #13
                          Re: Using Telnet

                          Yes you are right I want to use the Vista machine to connect to the XP machine.

                          The firewall is off and I just enabled telnet on the XP machine. How do I add an exception to port 23? Is it add port in windows firewall?

                          Right now when I try and connect it says "could not open connection to host, on port 23"

                          Also, for some reason the port that was previously open on the XP computer generates the same error message except instead of 23, its the port I put in.

                          What would you recommend now?

                          Comment


                          • #14
                            Re: Using Telnet

                            OK, maybe I have gotten off-track here. What is your ultimate goal? 1. Are you trying to telnet to the XP machine in order to run remote commands or 2. Are you trying to telnet to the XP machine to manipulate and work with a particular service/program/process running on that machine?

                            If 1. then you need to install the telnet server component on the XP machine and make sure the firewall allows incoming TCP connections to port 23.

                            If 2. then you need the service/process/program installed on the XP machine and you do not need the telnet server component installed.

                            Comment


                            • #15
                              Re: Using Telnet

                              I want to run remote commands on the XP machine. In firewall where do I allow TCP connections to port 23? Also I am going to guess that there is probably a download somewhere on google if I just look up "telnet server download."

                              Anything else I might need to know?

                              Thanks,
                              Spots

                              Comment

                              Working...
                              X