Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Post couldn't connect from putty in windows host to centos guest VM


    Hi,
    Guys, I'm shan and i'm trying to learn linux so i installed a centos6.9 in VM and tried to establish connection through putty from my windows host but i'm not able to create a connection. can any linux experts solve this problem for me. So, far what i ave done.

    Code:
    sudo service sshd start
    and confirmed that it was working in centos then disbled the firewall.

    Code:
    sudo service iptables stop
    
    sudo chkconfig iptables off
    Then did a port forwarding like this in virtualbox:

    port.PNG

    still its not working.
    Last edited by shan2batman; 01-25-2018 at 09:46 AM. Reason: couldn't see image

  2. #2
    Linux Newbie sarlacii's Avatar
    Join Date
    May 2005
    Location
    South Africa
    Posts
    223
    Hi there

    Try to ssh to localhost on the linux machine, to check that ssh is running. Also ssh to the actual IP to check connection.

    I am not sure about Virtual Box, I'm afraid, but on other VM's that I've used, there is no port forwarding required. Once the VM has an valid IP, you can connect to any open ports. The VM manager does not firewall... just the client OS.

    Go well.
    Last edited by sarlacii; 01-26-2018 at 11:43 AM. Reason: spelling

  3. #3
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    Quote Originally Posted by shan2batman View Post
    Hi,
    Guys, I'm shan and i'm trying to learn linux so i installed a centos6.9 in VM and tried to establish connection through putty from my windows host but i'm not able to create a connection. can any linux experts solve this problem for me. So, far what i ave done.

    Code:
    sudo service sshd start
    and confirmed that it was working in centos then disbled the firewall.

    Code:
    sudo service iptables stop
    
    sudo chkconfig iptables off
    Then did a port forwarding like this in virtualbox:

    port.PNG

    still its not working.
    you're not giving us much to work with.
    guest os' sshd needs to be configured, putty needs to be configured, but you haven't shown us anything.
    each command will produce some, or no, output.
    we need to see that, too.
    both on the guest & on the host.
    all the steps.

    PS: i cannot see the picture.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,472
    -->
    Hi.

    Just a guess based on many personal errors -- this sounds like you installed the networking with NAT instead of bridged:
    Bridged connections are just that, essentially a virtual switch is connected between the VM and your physical network connection.

    NAT'd connections are also just that, instead of a switch a NAT router is between the VM and your physical network connection.
    If this is the case, my recollection is that the simple correction would be all you'd need to change, no re-install necessary, just power-down the VM, fix, power-up, and the VM should be connectible.
    See https://serverfault.com/questions/49...nat-networking for more.

    Best wishes ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •