+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
*nix Thread, Virutal Machine And CentOS in Technical; Tried ssh localhost to ensure SSH is running?...
  1. #16


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,690
    Thank Post
    352
    Thanked 795 Times in 714 Posts
    Rep Power
    346
    Tried ssh localhost to ensure SSH is running?

  2. #17

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,624
    Thank Post
    1,240
    Thanked 778 Times in 675 Posts
    Rep Power
    235
    Quote Originally Posted by My220x View Post
    I now have it all setup and have installed ssh software but how do I connect via Putty? I typed ifconfig in a terminal and got the inet addr for eth0 but I tried to connect using it via Putty and got nothing.
    How did you install SSH on the virtual server? I know when I install CentOS on our servers I don't have to specifically check an "install SSH" option, it seems to be part of the "server" package setup. Firewall exceptions are automatically made, too. Are you sure your VM is actually connected to your network (what virtual machine system are you using, anyway?)? Try pinging Google or something from your virtual machine instance, see if it can actually connect to the outside world.

    --
    David Hicks

  3. #18
    My220x's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    257
    Thank Post
    9
    Thanked 3 Times in 3 Posts
    Blog Entries
    8
    Rep Power
    14
    I actually ended up installing Ubuntu and I installed ssh via the shell using apt-get install and I can connect to the internet via my Virtual Machine and I am using VM Box or something. Also, I can now SSH into it but I now get a time out error.

  4. #19

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,624
    Thank Post
    1,240
    Thanked 778 Times in 675 Posts
    Rep Power
    235
    Quote Originally Posted by My220x View Post
    I actually ended up installing Ubuntu and I installed ssh via the shell using apt-get install and I can connect to the internet via my Virtual Machine and I am using VM Box or something. Also, I can now SSH into it but I now get a time out error.
    "VM Box or something" - you mean you're using VMWare, right?

    "I can now SSH into it but I now get a time out error" - you mean the SSH server is running on the virtual machine (as suggested above, on the virtual machine itself you can type "ssh localhost" and connect okay, right?) but you can't actually connect to it from your physical machine? You know the network interface is up, though, as you can ping external addresses from your virtual machine. I would guess firewall again - either the firewall on your virtual machine needs to be configured to allow SSH connections in, or your physical machine needs to be configured to let SSH connections out.

    --
    David Hicks

  5. #20
    My220x's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    257
    Thank Post
    9
    Thanked 3 Times in 3 Posts
    Blog Entries
    8
    Rep Power
    14
    Would I type ssh localhost into the linux terminal? I havent tried this so when I get home I will.

  6. #21


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,690
    Thank Post
    352
    Thanked 795 Times in 714 Posts
    Rep Power
    346
    Yes ... because you are trying to SSH into the local machine.

  7. #22
    My220x's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    257
    Thank Post
    9
    Thanked 3 Times in 3 Posts
    Blog Entries
    8
    Rep Power
    14
    Ok, cool , will do that when I get home and if I can do that what would I do next?

  8. #23


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,690
    Thank Post
    352
    Thanked 795 Times in 714 Posts
    Rep Power
    346
    If that works, you have proven that SSH is working correctly on the local machine and that the problem lies elsewhere.

    On the Linux box, run /sbin/ifconfig (or just ifconfig depending on the path setup) and note down the information into a file and post it here.

    Example
    [root@frisky ~]# ifconfig
    eth1 Link encap:Ethernet HWaddr 000:B7:B9:85:63
    inet addr:10.12.112.18 Bcast:10.12.115.255 Mask:255.255.252.0
    inet6 addr: fe80::2d0:b7ff:feb9:8563/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:4751024 errors:0 dropped:0 overruns:0 frame:0
    TX packets:424780 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:573642789 (547.0 MiB) TX bytes:89566592 (85.4 MiB)
    Memory:feae0000-feb00000
    The theory would be that whatever IP is has can be SSH'd into from your PC but it wholly depends on how you've created the VM, i.e. bridged networking or whatnot.

    If you're definitely certain on the network address front, you need to look for firewall implications, again on the linux box, type iptables -L and see what it says.

  9. #24

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,624
    Thank Post
    1,240
    Thanked 778 Times in 675 Posts
    Rep Power
    235
    Quote Originally Posted by My220x View Post
    Ok, cool , will do that when I get home and if I can do that what would I do next?
    If, from the Linux command line prompt of your virtual machine, you can type "ssh localhost" and get an open SSH connection then that means that the SSH server (SSHD) is running on your virtual machine. You also know that the (virtual) network interface is working as you can type something like "ping www.google.co.uk" and get a response. Therefore, if you still can't connect from your physical machine to your virtual machine, the most likely (?) problem is something to do with your firewall - either the firewall on your virtual machine needs to be configured to allow SSH connections in, or your physical machine needs to be configured to let SSH connections out.

    --
    David Hicks

  10. #25

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,624
    Thank Post
    1,240
    Thanked 778 Times in 675 Posts
    Rep Power
    235
    Quote Originally Posted by kmount View Post
    The theory would be that whatever IP is has can be SSH'd into from your PC but it wholly depends on how you've created the VM, i.e. bridged networking or whatnot.
    Oh yea, good point - the two machines could be on different subnets or something. Could also add try and ping the virtual machine from the physical one (i.e. open up command prompt in Windows, type "ping IPaddress.of.virtual.machine" and see what happens), just to make sure they can actually see each other.

    --
    David Hicks

  11. #26
    My220x's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    257
    Thank Post
    9
    Thanked 3 Times in 3 Posts
    Blog Entries
    8
    Rep Power
    14
    ok when i get home i will run the local ssh and then try and ping the ip and will then note down the results from ifconfig and post it here.

  12. #27
    My220x's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    257
    Thank Post
    9
    Thanked 3 Times in 3 Posts
    Blog Entries
    8
    Rep Power
    14
    Ok, localssh works fine, however I cant ping via my physical machine, I get timed out.

    Results of ifconfig:

    eth0 Link encap:Ethernet HWaddr 08:00:27:29:61:f1
    inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
    inet6 addr: fe80::a00:27ff:fe29:61f1/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:11 errors:0 dropped:0 overruns:0 frame:0
    TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1470 (1.4 KB) TX bytes:5382 (5.2 KB)
    Interrupt:11 Base address:0xc020

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:452 errors:0 dropped:0 overruns:0 frame:0
    TX packets:452 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:27932 (27.2 KB) TX bytes:27932 (27.2 KB)

  13. #28


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,690
    Thank Post
    352
    Thanked 795 Times in 714 Posts
    Rep Power
    346
    What's the output of ipconfig /all on your local machine?

  14. #29
    My220x's Avatar
    Join Date
    Feb 2008
    Location
    UK
    Posts
    257
    Thank Post
    9
    Thanked 3 Times in 3 Posts
    Blog Entries
    8
    Rep Power
    14
    Quote Originally Posted by kmount View Post
    What's the output of ipconfig /all on your local machine?
    Microsoft Windows [Version 6.0.6000]
    Copyright (c) 2006 Microsoft Corporation. All rights reserved.

    C:\Users\Daniel>ipconfig /all

    Windows IP Configuration

    Host Name . . . . . . . . . . . . : Daniel-PC
    Primary Dns Suffix . . . . . . . :
    Node Type . . . . . . . . . . . . : Hybrid
    IP Routing Enabled. . . . . . . . : No
    WINS Proxy Enabled. . . . . . . . : No
    DNS Suffix Search List. . . . . . : lan

    Ethernet adapter Local Area Connection:

    Connection-specific DNS Suffix . : lan
    Description . . . . . . . . . . . : SiS191 Ethernet Controller
    Physical Address. . . . . . . . . : 00-1C-25-89-21-E9
    DHCP Enabled. . . . . . . . . . . : Yes
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . : fe80::9dcf:6232:f21:5a04%8(Preferred)
    IPv4 Address. . . . . . . . . . . : 192.168.1.64(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Lease Obtained. . . . . . . . . . : 17 July 2008 05:34:10
    Lease Expires . . . . . . . . . . : 18 July 2008 06:32:17
    Default Gateway . . . . . . . . . : 192.168.1.254
    DHCP Server . . . . . . . . . . . : 192.168.1.254
    DHCPv6 IAID . . . . . . . . . . . : 134218092
    DNS Servers . . . . . . . . . . . : 192.168.1.254
    NetBIOS over Tcpip. . . . . . . . : Enabled

    Tunnel adapter Local Area Connection* 6:

    Connection-specific DNS Suffix . :
    Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
    Physical Address. . . . . . . . . : 02-00-54-55-4E-01
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes
    IPv6 Address. . . . . . . . . . . : 2001:0:d5c7:a2ca:34:21df:3f57:febf(Prefer
    red)
    Link-local IPv6 Address . . . . . : fe80::34:21df:3f57:febf%10(Preferred)
    Default Gateway . . . . . . . . . : ::
    NetBIOS over Tcpip. . . . . . . . : Disabled

    Tunnel adapter Local Area Connection* 7:

    Connection-specific DNS Suffix . : lan
    Description . . . . . . . . . . . : isatap.lan
    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . : fe80::5efe:192.168.1.64%9(Preferred)
    Default Gateway . . . . . . . . . :
    DNS Servers . . . . . . . . . . . : 192.168.1.254
    NetBIOS over Tcpip. . . . . . . . : Disabled

    C:\Users\Daniel>

  15. #30


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,690
    Thank Post
    352
    Thanked 795 Times in 714 Posts
    Rep Power
    346
    So given your vm is on the 10.* range and your PC is on the 192.* it's unlikely without some clever routing it will work.

    I suggest you look in VMWare at what network settings you assigned for your VM. I'd think you've set Host-Only and it needs to be Bridged so it gets an IP 192.x.x.x from your DHCP(Router?).

SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. CentOS & KS3 ICT Tests
    By mortstar in forum *nix
    Replies: 7
    Last Post: 11th May 2009, 04:32 PM
  2. Need to see who logged onto a machine
    By LeonieCol in forum How do you do....it?
    Replies: 6
    Last Post: 10th June 2008, 10:43 AM
  3. XP machine description
    By mudcow007 in forum Windows
    Replies: 5
    Last Post: 26th March 2007, 11:22 PM
  4. Compiling for another machine
    By Ric_ in forum *nix
    Replies: 3
    Last Post: 13th March 2007, 03:34 PM
  5. Machine Advice
    By Simcfc73 in forum Gaming
    Replies: 11
    Last Post: 12th January 2007, 10:27 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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