4 Replies Latest reply on Mar 5, 2009 12:14 PM by bplotkin

    Remote SSH to VMware

    drummingfool Lurker

      Here's my issue:

       

       

       

       

       

       

       

      I have set up vmware running CentOS 5.2 on a vista host machine. I would like to remote SSH into my centos from anywhere. I can ssh into centos locally from the host box, but not remotely. I assume this has something to do with port forwarding. I am running straight into a modem from the host box and therefore do not have direct port forwarding. I can also VNC into the host machine remotely. Also the windows firewall is off, as well as all firewall options on centos.

       

       

      Someone help! having to vnc into the host box and then use vm is getting painfully slow. Any ideas?

        • 1. Re: Remote SSH to VMware
          Hot Shot

          What network type are you using for the guest.  It will need to be "Bridged" to be able to access it from outside your host.  After you have that set up, it should behave (for networking purposes) exactly like a physical host on your network.

           

          This might, however, not work with your direct connection to the modem.

          • 2. Re: Remote SSH to VMware
            drummingfool Lurker

             

            The network connection is set up as bridged. I run lsof -i on the centos and use the port listed as listening for ssh when trying to connect remotely.

             

             

            For example, centos says port 11213 is used to listen for SSH connections, so when I try to remote SSH I type remote.ip.address.here and port 11213. Still says connection refused.

             

             

            ps- Im using putty as my SSH connection client.

             

             

            • 3. Re: Remote SSH to VMware
              drummingfool Lurker

               

              Now it tells me when trying to connect:

               

               

              "Server unexpectdedly closed connection"

               

               

              Ive tried direct connecting to the open port on vm for ssh, and Ive also tried port tunneling via putty from an open port on the host machine to the ssh port on vm.

               

               

              This is really getting aggrivating.

               

               

              • 4. Re: Remote SSH to VMware
                bplotkin Lurker

                You will need to enable ssh for external networks.

                 

                Open /etc/hosts.allow ( something like $vi /etc/hosts.allow)  and add the following line at the bottom:

                SSHD: ALL

                 

                or even easier type at the prompt

                echo "SSHD: ALL" >> /etc/hosts.allow

                 

                This will allow all external networks to connect to the SSH service.

                otherwise you can put an IP or a range of IPs to have a more secure system (google hosts allow for more information).