Find the answer to your Linux question:
Results 1 to 10 of 10
Brand new to linux. I have a FRESH install of SuSE 11 on a box. I'm trying to connect to it via SSH using Putty on a windows box. I ...
  1. #1
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12

    Can't SSH to server

    Brand new to linux. I have a FRESH install of SuSE 11 on a box. I'm trying to connect to it via SSH using Putty on a windows box. I keep getting "Connection Refused". I completely disabled the firewall on the SuSE box to rule that out and I don't know where to look next! Any suggestions?

    PS: my ultimate goal is to be able to put this box in the corner of a room and only have power and cat5 connected to it. I want to be able to control it remotely.

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    A) Telnet from Windows > SLES port 22 and confirm you get an SSH prompt.

    Like:

    Code:
    Escape character is '^]'.
    SSH-2.0-OpenSSH_5.5p1 Debian-4ubuntu5
    B) Edit the /etc/ssh/sshd_config file and ensure PasswordAuthentication is allowed and restart the SSH daemon.

    Code:
    # Change to no to disable tunnelled clear text passwords
    PasswordAuthentication yes
    Code:
    /etc/init.d/ssh restart

  3. #3
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12
    This is what i get when trying to telnet to my linux box from my windows 7 machine using the command prompt:

    C:\Users\Pave>telnet 192.168.10.86
    Connecting To 192.168.10.86...Could not open connection to the host, on port 23:
    Connect failed

    I also checked the config file and Password Authentication is set to yes.

    Still getting "Connection Refused"!

  4. #4
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12
    when using telnet to the linux box from windows, do i need to specify the port(23)?

  5. #5
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    What is SSH?

    SSH's default port is 22. If you don't specify a port, the telnet CLIENT will use the default port for a telnet SERVER (23.)

    Code:
    telnet <IP_ADDRESS> 22
    C) Did you connect to the SSH server from the local (SLES) machine?

    Code:
    ssh localhost

  6. #6
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12
    tried to connect to the server from the local machine. Got "Connection Refused". I can not connect to the SSH server even while ON the actual server. I even went further and tried to do it as super user.

    So, I'm sure it has to do something with the Linux machine I'm trying to connect to. The firewall is disabled and I can ping the machine so perhaps there is some SSH configuration that I am overlooking that is resulting in the connection being refused.

    EDIT: This is a fresh, default install of SuSE 11. Is there any security settings that I would need to disable to allow me to do this?
    Last edited by paveway; 05-07-2011 at 06:07 AM. Reason: more information.

  7. #7
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    "Connection refused" comes from not having something to connect to or something blocking the connection - it will not be an SSH configuration issue (unless your config is preventing SSH from starting.)

    A) Is the SSH daemon even running?

    Code:
    /etc/init.d/sshd status
    Code:
    netstat -anp | grep ssh
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1150/sshd
    B) Have you looked at the firewall rules to be certain?

    Code:
    iptables -L -v

  8. #8
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12
    when checking the status, i get "checking for service sshd unused"


    when using the netstat command you provided, it comes up with nothing.


    the firewall has been completely disabled. I typed the iptables command you provided and could not identify anything that had to do with ssh.

    At this point I'm thinking the damn thing isn't even installed... how can i verify that it is even on my machine? Doesn't SuSE come with it?

  9. #9
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12
    scratch that, iptables does show a place where ssh connections are being accepted.

  10. #10
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    checking for service sshd unused
    Means the service is not running. Why not look at the SUSE documentation to understand how to start/stop and check what services are running?

    Code:
    /etc/init.d/sshd start
    Code:
    ps -ef | grep ssh

Posting Permissions

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