The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    SSH issues...

    Discussion in 'Linux Compatibility and Software' started by Thaenatos, Feb 4, 2011.

  1. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    For some reason I cannot ssh into my server at home but the /var/www .html file is visible from the web. Im wondering what is going on and if maybe some web server task shut down SSH or a daemon. Im not very handy with linux anymore so here I am asking you guys for a suggestion. Have any? :eek:
     
  2. Ayle

    Ayle Trailblazer

    Reputations:
    877
    Messages:
    3,707
    Likes Received:
    7
    Trophy Points:
    106
    Are you sure it's not at the router level? is the ssh port open and being forwarded to your server?
     
  3. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Yeah the port is open. I have it forwarded to the server.
     
  4. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Basically Im wondering is the installation of webserver tools and files may have messed with my ssh settings. I can ping the address and hostname thats in my ddclient, but cannot resolve a connection. Its weird to say the least.
     
  5. Patrick

    Patrick Formerly beat spamers with stiks

    Reputations:
    2,284
    Messages:
    2,383
    Likes Received:
    94
    Trophy Points:
    66
    From a mac or linux computer try ssh -vvv hostname and then see where its dying. And It does sound like port 22 is not open somewhere down the line.
     
  6. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Im not using port 22, Ill run the command and see what I get.
     
  7. Patrick

    Patrick Formerly beat spamers with stiks

    Reputations:
    2,284
    Messages:
    2,383
    Likes Received:
    94
    Trophy Points:
    66
    wait... why are you not using port 22 for ssh?
     
  8. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Ran the command and this is what I get:

    OpenSSH_5.5p1 Debian-4ubuntu4, OpenSSL 0.9.8o 01 Jun 2010
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    ssh: Could not resolve ...
     
  9. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    security and Im using 2222 as ubuntu has in their tutorial.

    edit: old habits die hard...
     
  10. Patrick

    Patrick Formerly beat spamers with stiks

    Reputations:
    2,284
    Messages:
    2,383
    Likes Received:
    94
    Trophy Points:
    66
    Well, the error is telling me the computer cannot resolve the domain name.

    And what tutorial tells you to use port 2222? Because I have NEVER heard of that in a tutorial.
     
  11. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    https://help.ubuntu.com/6.06/ubuntu/serverguide/C/openssh-server.html

    Thats the one I use. The funny thing is Dyndns sees the right IP, and I can access /var/www/index.html from anywhere using a browser with my host name. Which is why I was thinking the webserver is causing an issue.
     
  12. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Im using that port for my work SSH server and its been stable for a looong time.
     
  13. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
  14. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Sent this command on my ssh server at work (obviously with the real username and address):

    Code:
     ssh -vvv [email protected] -p 2222
    and it spit this back at me:

    Code:
    OpenSSH_5.5p1 Debian-4ubuntu4, OpenSSL 0.9.8o 01 Jun 2010
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to XXX.XXX.com [XXX.XXX.XXX.XXX] port 2222.
    debug1: connect to address XXX.XXX.XXX.XXX port 2222: Connection timed out
    ssh: connect to host XXX.XXX.com port 2222: Connection timed out
    Again the xxx's used to mask my sensitive data. But I can type in the address into a web browser anywhere and get index.html so I really think its the web server interfering. How its doing that? I dont know. But as of right now I have tweaked my config files many times even tried going completely back to port 22 and nothing. I even went through every SSH based system file and made sure it matched my work files (minus address and login info) and still nothing. I honestly am to the point where Im going to reformat and not include web server or anything else for that matter.
     
  15. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    It seems like either your port is not forwarded, or the server isn't listening on 2222. There's not much that I can do to diagnose that on a forum.. :(
     
  16. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    Yeah thanks for your help. Im going to start from scratch and make my ssh server run on a VM on my SXPS so I can have it directly access my eSata drive. Going to be much much faster anyways for off site storage.
     
  17. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    You could just dpkg-reconfigure openssh-server and see if that works. Or reinstall and reconfigure the package after purging your web server stuff (if you don't need it). There's no reason you'd have to do a full reinstall for that really.

    Also, you could try your ssh server on the LAN to see if it's really running, and then nmap your public IP and see if the port is open... besides that it's either configuration of openssh or your firewall.
     
  18. Thaenatos

    Thaenatos Zero Cool

    Reputations:
    1,581
    Messages:
    5,346
    Likes Received:
    126
    Trophy Points:
    231
    I ended up scrapping the seperate ssh server box and went with a VM. I was able to download 10.10 ISO, virtualbox, and install and configure within an hour. Took 5 minutes from first boot to install and configure ddclient and get remote ssh access. This way my ssh server will have better access to my eSata drive for the cronjob Im going to setup.

    As for the old sever I did run nmap, even went to canyouseeme.org to check the port. I was always able to ssh locally, just couldn't remotely access through ssh. Either way the server is now down due to the VM pulling its duties. I have toyed with it being my web server, but I dont think I want to mess with my current setup as its working flawlessly. Maybe Ill take a snap shot of my server now and try lamp on it and worst case Ill just go back to the old VM file. But for now its time to setup VNC for a remote windows gui and off site storage setup. Going to be interesting mounting a windows share from a VM.
     
  19. Sxooter

    Sxooter Notebook Virtuoso

    Reputations:
    747
    Messages:
    3,784
    Likes Received:
    8
    Trophy Points:
    106

    That sounds like a firewall / iptables issue to me.