Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25
Hello Guys, I've just caried out a full install with most of the Key componant packages, i left out all the GUI related stuff. I'm trying to connect to my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2006
    Posts
    49

    SSH and Putty


    Hello Guys,

    I've just caried out a full install with most of the Key componant packages, i left out all the GUI related stuff.

    I'm trying to connect to my box using Putty and WinSCP to browse my files, my understanding is that both of these simply use SSH to do so.

    I have the sshd package installed and had it set to start on boot, and during the boot process just before login i get the echoed message sayng sshd has been started.

    From what i can see on my router it looks as if the box has connected to the routers DHCP and aquired an IP address, but when i place this into my putty i just get a timeout error kicked back which would suggest.

    How can i confirm my boxes IP address? and how can i confirm is SSH is started?

    If SSH isn't running then can I start it?

    Sorry for sounding like a nOOb, but at the end of the day thats what i am lol, i've used DSL in the past and i have just been able to start SSH and then dial in without issues.

    Thanks,

    Rob

  2. #2
    Just Joined!
    Join Date
    Mar 2006
    Posts
    11
    Seems I get to make appearance on these forums as well...


    I'm trying to connect to my box using Putty and WinSCP to browse my files, my understanding is that both of these simply use SSH to do so.
    I have no experience on WinSCP but I do believe they'll use ssh. Just make sure you have chose the correct protocol from it.

    I have the sshd package installed and had it set to start on boot, and during the boot process just before login i get the echoed message sayng sshd has been started.
    This part seems ok. SSH is running so that's not an issue.

    From what i can see on my router it looks as if the box has connected to the routers DHCP and aquired an IP address, but when i place this into my putty i just get a timeout error kicked back which would suggest.
    This seems to be the problem. Your router acts as a DHCP server? In this case your PuTTY connection will try to find your LAN IP but that isn't available at all so it times out. What you need to do is, get the routers IP. Router gets it's IP from your ISP. After you know your router's IP, use NAT on it to forward port 22 or whichever you use for SSH to your LAN machine. Now the router should forward all PuTTY's connections to the correct place. You can find the routers IP with "tracert" on WIN or "traceroute" on linux. Or check in the configuration utility of the router what's it's WAN IP is.

    How can i confirm my boxes IP address? and how can i confirm is SSH is started?
    In linux, issue "ifconfig eth0" and tells your IP.
    To check if SSH is running, try "ps ax | grep ssh".

    If SSH isn't running then can I start it?
    Issue following: "/etc/rc.d/rc.ssh start"


    Above is from memory as I haven't used slack for a while. Probably will install it on my laptop this weekend, though

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    49
    Lol well done buddy.

    You did well on that one, It would appear that dhcpcd is not running on my linux box so it isn't leasing an IP address and Subnet from my router.

    How do i start dhcpcd? Preferably on boot would be good.

    I ran ifconfig and found that my IP address for the eth0 was 127.0.0.1, but when i try this in my putty client i get 'Connection Refused' error come back at me, which would suggest maybe a SSH issue, i dont know.

    If we can get my box leasing an IP from my router that would be great.

    Thanks,

    Rob

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2006
    Posts
    11
    Try again with plain "ifconfig" to make sure the ethernet connection (I'm assuming you use this) uses eth0. Then you could issue "ifconfig eth0 up" to bring it up, if it is already not.

    To use dhcpcd, you just need to type "dhcpcd eth0" and it should get an IP. If it doesn't work, then I would assume the problem is with the router.

    Try "ping localhost" to see if you have connection to your ethernet card. After that it probably be a router issue.

    I'd take that the "connection refused" is because your router. Have you checked it's firewall rules to allow connections to port 22 to pass?

    To make dhcpcd run at boot you need to modify... /etc/rc.d/rc.initd.conf or something like that. There you will find some example lines, just uncomment the ones you need. I don't remember how exactly as I use Gentoo currently.

    My work shift is nearly over so I'm heading home soon but hopefully your ISP got their work done and I will have broadband access there so I can check back into this case later on and not to wait until monday.

  6. #5
    Just Joined!
    Join Date
    Jun 2006
    Posts
    49
    Thanks for that mate,

    I'm just rebuilding the box at the moment and i'll give it a go.

    My routrers DHCP is running fine as i've got several systems running on it, and port forwarding for 22 is all set as usual.

    I could see the eth0 card and it had a local 127.0.0.1 address assigned to it, if my router was pushing it out it would have been 192.168.1.x

    I'll wait and see what happends, and post back with any more info.

    Thanks,

    Rob

  7. #6
    Just Joined!
    Join Date
    Jun 2006
    Posts
    49
    Hello bud,

    Box is alive again and this time during install i chose to configure my network, chose a static IP, set my subnet and gateway as i require them.

    However on boot i now run 'ifconfig' and still get a 127.0.0.1 address for my card, i cannot find it on 'eth0' it appears to be on 'lo', if i try to 'ifconfig eth0' then i get the error:

    eth0: error fetching interface information: device not found.

    If i 'ping local' then it runs through a stack of ping commands without any issues.

    Any idea as to what is going on here?

    Thanks,

    Rob

  8. #7
    Just Joined!
    Join Date
    Jun 2006
    Posts
    49
    Ok, so here we go,

    I've built the box one final time, and in the setup proceedure i chose to use DHCP settings.

    Again on boot when i run 'ifconfig' i get somthing like the following returned. I'm not running a terminal window so can only give you a rough idea.

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1

    All RX and TC packets, errors, dropped and overruns are set to 0

    I'm not sure why, but it apears to be setting my network up as a loopback, which isn't what i require.

    Any ideas as to why this is? perhaps my network card isn't installed or configureed properly?

    I'm running the on-board card that came on the Via-Mini-ITX board that i'm using in the box.

    Thanks,

    Rob

  9. #8
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    Sounds like your NIC is not being recognized during installation - therefore, the drivers are not being installed and subsequently loaded. Post the result of the following command "ifconfig" so that we can see what is actually going on.

  10. #9
    Linux Enthusiast
    Join Date
    Jun 2005
    Posts
    668
    you can use 'netconfig' as root to avoid constantly rebuilding the machine just to get to setup.

    also, you can hand edit /etc/rc.d/rc.inet1.conf and statically set your IP, or set it to DHCP for that adaptor.

    once you have sshd running, winscp and putty _just work_ (as long as you point it to the correct ip!)



    if you want to look for your network card driver. I'd suggest...

    Code:
    lspci -vv | grep Ethernet to find the device info
    you already said its a via, so try
    Code:
    modprobe -l | grep via, see if it returns any modules related to network cards
    its a chance your network card driver module is 'via-rhine', in that case we would load the driver like so
    Code:
    modprobe via-rhine
    the 'dmesg' command will show you information after loading the module, you can then try bringing the interface up like
    Code:
    ifconfig eth0 up
    now an 'ifconfig -a' would show you eth0 as well as the loopback adaptor 'lo'

    of course, if you can just enable hotplug and udev instead, you might find it probes and loads the driver module automatically.

    Code:
    (for a 2.6 kernel, I think hotplug works with 2.4 but not udev)
    chmod +x /etc/rc.d/rc.hotplug
    chmod +x /etc/rc.d/rc.udev
    then reboot, and see if you have an eth0 with ifconfig -a

    then a simple
    Code:
    dhcpcd eth0
    will attempt a DHCP lease, but this would be performed on boot, provided you set the interface to DHCP in netconfig, or /etc/rc.d/rc.inet1.conf


  11. #10
    Just Joined!
    Join Date
    Jun 2006
    Posts
    49
    Hello Mate,

    As i briefly mentioned above, when i run 'ifconfig' i get the following result.

    Code:
    lo     Link encap:Local Loopback
           inet addr:127.0.0.1 Mask:255.0.0.0 
           UP LOOPBACK RUNNING MTU:16436 Metric:1
           RX packets:0   error:0    dropped:0   overruns:0   frame:0
           TX packets:0   error:0    dropped:0   overruns:0   carrier:0
           collisions:0 txquelen:0
           RX bytes:0  (0.0 b)     TK bytes:0   (0.0 b)
    Although i dont know alot about these things, i think you may be right about it not detecting my NIC, how can i install it manualy?

    It's an on board card in a VIA Mini-ITX M series board, i've not had issues with other linux distros running it out the box.

    I'm running Kernal 2.6 if that makes any differance.

    Thanks,

    Rob

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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