Perfect Setup Ubuntu 7, SSH Question

Discussion in 'Installation/Configuration' started by chez17, Jul 27, 2007.

  1. chez17

    chez17 New Member

    In the Perfect Setup tutorial for Ubuntu 7.04, you mention connecting with PuTTY. I have no idea how to do this, can someone give me a breif explination? Here is my situation:

    I am on a laptop running XP that connects to the router wirelessly
    The box that has ubuntu on it is connected to the router with a cable

    I tried entering 192.168.0.100 into PuTTY on the windows client and it brings up the prompt screen, but it is completely blank and I can not type anything, after a while an error pops up, 'Network error: Connection timed out'. I am completely 100% new to all this, any help would be appreciated.

    Dave
     
  2. inshimbi

    inshimbi New Member

    You are getting the message for a few reasons. The ones I can think of are.

    1. you dont have sshd running on your linux box. If so make sure you have ssh server installed, you can install openssh or something like that.

    2. If sshd is running, maybe your router is blocking port 22 and you need to unblock it.
     
  3. chez17

    chez17 New Member

    In the tutorial, I ran:

    apt-get install ssh openssh-server

    So i think its installed. Do I need to do anything else to get it running? If my router is blocking that port, how do I unblock it?
     
  4. inshimbi

    inshimbi New Member

    If you installed it like that you shouldn't have to do anything but...who knows.

    run lsof -i on your terminal window and see if you see something like this sshd 642 root 3u IPv4 1287 TCP *:ssh (LISTEN)

    are you trying to connect to it from somewhere else outside your network or are u at home and trying to connect using a different machine?

    The reason I ask this is I work for a company that has port 22 outgoing blocked, and i get the same error you get. I do however can access my machine from other networks including my own.

    To make sure your router is accepting port 22 incoming u have to edit your router config via a web interface, should be in router manual, this is different for each router.

    also you might have to check on your terminal if port 22 is disabled...
    by doing iptables -L (this depends on whether you are running iptables or not)
     
  5. chez17

    chez17 New Member

    Ok, so everything started typing with in caps for no reason and It wouldn't even startup so I am currently reinstalling it. I have a feeling if somebody who knew what they were doing was watching me, it would be pretty damn funny. As I said, I literally have no idea whats going on. So I am using the prefect setup tutorial and I have gotten to page 3. I have installed ssh. I am trying to connect to the box form my laptop over a LAN. I am connected to my linksys router wirelessly from the laptop. The linux box is connected to the router with a cable.
     
  6. chez17

    chez17 New Member

    Ok, I got it working! I connected with PuTTY. On to the next problem. Now my computer is using the dhcp way of connecting. I am trying to follow this step in the tutorial.:

    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
            address 192.168.0.100
            netmask 255.255.255.0
            network 192.168.0.0
            broadcast 192.168.0.255
            gateway 192.168.0.1
    The problem is that before I do that, my box can connect to the internet, I can ping a site and get a response. If I do this step and restart the network, the pings no longer work. I lose the connection. I should add that my router's address is 192.168.1.1, but if I try putting that in for network or gateway, the network wont even restart. You can see the tutorial here:

    http://www.howtoforge.com/perfect_setup_ubuntu704_p3

    Any thoughts?
     
  7. inshimbi

    inshimbi New Member

    Ok...

    if your router's ip is 192.168.1.1

    then the Ip of ur machine should be in the form 192.168.1.XXX where XXX could be 100 or whatever

    Since u said its Ip right now is 192.168.0.100, thats in a completely different subnet than 192.168.1.1
    and the gateway should be 192.168.1,1
    so change the IP and try it
     
  8. chez17

    chez17 New Member

    OK, I'm making progress. Before I couldn't get the internet to work with a static ip or ssh in. Now I CAN get the internet but still can't ssh in. Im not sure. I have the ip address as 192.168.1.17, and it still wont work. Im stuck.
     
  9. falko

    falko Super Moderator

    What's the output of
    Code:
    ifconfig
    on the Ubuntu system?
     

Share This Page