Unable to connect to Linux (Virtual OS-vmware) through Putty on Windows

19,386

Make sure the ssh server is actually running inside Ubuntu.

try # ps aux | grep ssh

or # netstat -anp | grep ssh

Share:
19,386

Related videos on Youtube

RBA
Author by

RBA

Updated on September 17, 2022

Comments

  • RBA
    RBA over 1 year

    I want to access my Linux box (Virtual OS) through Putty on Windows using Run command:

    putty -ssh -P 22 192.168.171.130,,, 
    

    but it is returning an error message, not able to connect.

    But few days back I was able to connect it today. But not now. Why??

    Windows IP Configuration
    
            Host Name . . . . . . . . . . . . : rba7791fd466
            Primary Dns Suffix  . . . . . . . :
            Node Type . . . . . . . . . . . . : Unknown
            IP Routing Enabled. . . . . . . . : No
            WINS Proxy Enabled. . . . . . . . : No
    
    Ethernet adapter VMware Network Adapter VMnet1:
    
            Connection-specific DNS Suffix  . :
            Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for
    VMnet1
            Physical Address. . . . . . . . . : 00-50-56-C0-00-01
            Dhcp Enabled. . . . . . . . . . . : No
            IP Address. . . . . . . . . . . . : 192.168.234.1
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            Default Gateway . . . . . . . . . :
    
    Ethernet adapter Wireless Network Connection:
    
            Connection-specific DNS Suffix  . :
            Description . . . . . . . . . . . : Dell Wireless 1395 WLAN Mini-Card
            Physical Address. . . . . . . . . : 00-24-2B-60-A0-88
            Dhcp Enabled. . . . . . . . . . . : Yes
            Autoconfiguration Enabled . . . . : Yes
            IP Address. . . . . . . . . . . . : 10.0.0.2
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            Default Gateway . . . . . . . . . : 10.0.0.1
            DHCP Server . . . . . . . . . . . : 10.0.0.1
            DNS Servers . . . . . . . . . . . : 10.0.0.1
            Lease Obtained. . . . . . . . . . : Friday, August 28, 2009 4:11:09 AM
            Lease Expires . . . . . . . . . . : Saturday, August 29, 2009 4:11:09 AM
    
    Ubuntu Configuration
    eth0 inet addr:192.168.171.130
    
    • user1089802
      user1089802 over 14 years
      It probably just got another IP-adress this time. Your client should ask by DHCP, but vmware will give you a NAT-compliant ip-number.
    • cop1152
      cop1152 over 14 years
      can you ping it? is ssh server running on ubuntu? on port 22?
    • RBA
      RBA over 14 years
      how can i check that,, whether ssh server is running on port 22 or not,, or if it is not working, then how to work it on..
    • mmi
      mmi over 12 years
      Are you sure you bridged the network and the virtual network is not NATed?
  • cop1152
    cop1152 over 14 years
    good call...gotta be running ssh server before connecting to it...I had this happen to me. I thought it was installed by default.
  • RBA
    RBA over 14 years
    I am not able to ping guest machine. from windows..
  • RBA
    RBA over 14 years
    I have switched the firewall off, but then also it is not working..
  • RBA
    RBA over 14 years
    I donot find any information on port 22 by executing netstat on guest os
  • RBA
    RBA over 14 years
    I have switched the firewall off, then also it is not working.. not able to ping guest os's IP from windows host os
  • RBA
    RBA over 14 years
    unix 2 [ ACC ] STREAM LISTENING 8408 - /tmp/ssh-ltHduf3078/agent.3078 unix 2 [ ACC ] STREAM LISTENING 8959 3065/gnome-keyring- /tmp/keyring-ej2gKw/socket.ssh
  • RBA
    RBA over 14 years
    This is the output of netstat,, please help sir..
  • user1364702
    user1364702 over 14 years
    If you can't find anything listening on port 22 (sshd) and you haven't changed anything from defaults, then it's not running sshd. That's why you can't ssh from the host into the guest (or in part that's the reason). What happens if you run sudo /etc/init.d/sshd restart (or sudo /etc/init.d/ssh restart)?
  • kargig
    kargig over 14 years
    as root # aptitude install openssh-server and then netstat -anp | grep ssh