Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, I've been banging my head against the wall for days trying to connect to my linux computer using Putty. I know it shouldn't be hard, but I can't seem ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4

    Problems with SSH using PuTTY


    Hi, I've been banging my head against the wall for days trying to connect to my linux computer using Putty. I know it shouldn't be hard, but I can't seem to get the most basic connection sorted. I need to:

    -Leave my linux system on at home. It is sitting behind a standard wireless home broadband router.
    -Connect to this from work (or anywhere) using a windows XP laptop.
    -I can play with cygwin or whatever later, right now I'd be happy with simple terminal non-root access
    -The idea is that the home computer is running OpenFOAM CFD and will sit there crunching numbers all day. That way I can just access it from anywhere to set it going, check logs etc.


    The problem:
    Whenever I try to connect to the computer using putty from my laptop, it just times out, no connection refused or anything. It just sits there, blank screen for 30 seconds and then says 'Network error: Connection timed out'.


    I have tried:
    -from inside the home network 'ping 192.168.0.4' (linux desktop) from my laptop. It works

    -ping 192.168.0.3 (laptop IP) from the linux machine. It works

    -putty to 192.168.0.4 times out

    -putty to the router IP (from whatsmyip.com )and setting up port fowarding also times out. The router is definitely 'seeing' and forwarding on the connection, I can see it in the logs. I set it to forward to 192.168.0.4

    -I've tried all of the putty attempts mentioned using port 22 AND ALSO tried with a different port (1557). that includes the putty setting, the port forwarding and the port listing in sshd_config (and before you ask, also restarting sshd after any changes)

    -connecting from the same linux computer. ie ssh localhost or ssh -p 1557 localhost. This works fine

    Essentially it doesn't seem like my linux computer is 'hearing' the SSH request coming in, or possibly Putty is not sending properly.

    Any ideas whats wrong? I'm afraid I'm not very Linux- literate. Is there some way I can narrow down the error by getting the linux computer to 'listen' and see if its getting the SSH request from putty, for instance?

    Thanks very much for any help.



    Some specific details:
    desktop running OpenSUSE 11.2
    I have tried setting it up 'vanilla', and alternatively followed the configuration from (EDIT, oh wait it won't let me put URLs in) erm.. the guide here:
    linux-sxs.org/networking/openssh.putty.html
    I am in the UK, using a Sky broadband router

    Shout if theres any more info that would be useful

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    -putty to 192.168.0.4 times out
    Try if SSH is actually listening. In example below I telnet to a PC on my LAN named sipp:
    Code:
    telnet sipp 22
    Trying 192.168.2.1...
    Connected to sipp.
    Escape character is '^]'.
    SSH-2.0-OpenSSH_5.6
    See that response?

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    From the server, open a terminal and try

    ssh localhost

    If it won't connect, maybe the ssh daemon isn't running.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Quote Originally Posted by Segfault View Post
    Try if SSH is actually listening. In example below I telnet to a PC on my LAN named sipp:
    Code:
    telnet sipp 22
    Trying 192.168.2.1...
    Connected to sipp.
    Escape character is '^]'.
    SSH-2.0-OpenSSH_5.6
    See that response?
    Ahh, now this doesn't seem to work.. I get:

    > telnet 192.168.0.4 22 (while sshd is definitely looking at 22)
    connecting to 192.168.0.4...Could not open connection to the host, on port 22:
    Connect failed

    Does this imply the daemon is just set up wrong?


    Quote Originally Posted by rcgreen View Post
    From the server, open a terminal and try

    ssh localhost

    If it won't connect, maybe the ssh daemon isn't running.
    Yeah sorry, I forgot to mention that, connecting internally from the server works fine, and is consistent with port that I've set it to.

  6. #5
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    I think that you have to settle your problems with the servers firewall and check for REJECTs.

  7. #6
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Forgive me, I'm not positive that I understand what you mean.

    Do you mean my home broadband router (i.e. I go to 192.168.0.1, I think it is), and make sure that it is accepting and correctly forwarding the SSH request?

    Or do you mean there is something more that needs to be done on the linux machine?


    As to the former, it seems to be working fine, the logs correctly pick up any external connection attempt I make on the correct port and pass it on. If I connect internally (i.e. laptop to desktop both inside the home network) I get nothing shown on the router, which is what you'd expect isn't it?

    As to the latter, I have no idea whatsoever!

  8. #7
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    No, there has to be a firewall active on 192.168.0.4 which is blocking port 22.

  9. #8
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Ahh thats got it, thanks. I played around with it before, but apparently thought I'd opened the ports and had done something completely different.

    Thanks for helping narrow it down, when you're new to linux and SSH you never know whether anything you do is working!

    Thanks again

Posting Permissions

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