Results 1 to 21 of 21
  1. #1
    Join Date
    May 2007
    Posts
    1,979

    server unexpectedly closed network connection

    Hi guys! When I tried to log in via SSH to my VPS I get:

    server unexpectedly closed network connection

    Any ideas? I still can access via Webmin and use other services configured before. I am on cent os

    How can I possibly fix it if I cant access?

  2. #2
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    Webmin > Servers > SSH Server
    Stop / Start


    If you got to get medieval, System > Running Processes
    find /usr/sbin/sshd , click the pid, you'll see where you can HUP, etc.

    If that doesn't happen, something else is wrong...do you have denyhost, iptables or some auto-ban script running that you could have possibly set off?
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  3. #3
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,960
    Moved > VPS Forum.
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  4. #4
    Join Date
    May 2007
    Posts
    1,979
    Quote Originally Posted by mugo View Post
    Webmin > Servers > SSH Server
    Stop / Start


    If you got to get medieval, System > Running Processes
    find /usr/sbin/sshd , click the pid, you'll see where you can HUP, etc.

    If that doesn't happen, something else is wrong...do you have denyhost, iptables or some auto-ban script running that you could have possibly set off?
    I am currently trying to do the webmin stuff. I have added an exception to the iptables to allow me to log in ( before this happened)

  5. #5
    Is there enought space left on the vps hdd?

    Have your tried flushing the iptables rules via webmin?

  6. #6
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    Sure....Networking > Linux Firewall
    You can either fix it there, or just reset and "do over" from CLI.
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  7. #7
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    1,204
    can you access the /var/log/secure files and show us the errors regarding SSHD service?
    beast5.com Đ - Managed Hosting Solutions 2004 - 2016

  8. #8
    Join Date
    May 2007
    Posts
    1,979
    Quote Originally Posted by burger-king View Post
    Is there enought space left on the vps hdd?

    Have your tried flushing the iptables rules via webmin?

    I do have space ( almost 25 gigs ). Nope I didnīt .. what does flush mean? wipe? wonīt that mess my vpn config?

  9. #9
    Join Date
    May 2007
    Posts
    1,979
    Quote Originally Posted by mugo View Post
    Sure....Networking > Linux Firewall
    You can either fix it there, or just reset and "do over" from CLI.
    Thanks I am watching it and trying to figure out..

  10. #10
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    Just hit "reset firewall", that will flush all your rules (clear iptables).
    if you didn't do a save after the change, you can also just reboot your VPS, if you have some method to do that supplied by your host.
    Or send a ticket to have them reboot.
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  11. #11
    Join Date
    May 2007
    Posts
    1,979
    Quote Originally Posted by beastserv View Post
    can you access the /var/log/secure files and show us the errors regarding SSHD service?
    i canīt access it via console but made a backup with the control panel.. I will upload the log ASAP.. many thanks guys

  12. #12
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    Quote Originally Posted by elvis1 View Post
    I am currently trying to do the webmin stuff. I have added an exception to the iptables to allow me to log in ( before this happened)
    Everyone answering....it looks like he just did a bad rule and locked himself out of SSHd.
    Can change easily through webmin under firewall.

    Logs really aren't going to help if that is the case. And the service would still be running....

    Pretty sure he just needs to clear the bad rule or dump all the rules and do it again.
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  13. #13
    Join Date
    May 2007
    Posts
    1,979
    Quote Originally Posted by mugo View Post
    Just hit "reset firewall", that will flush all your rules (clear iptables).
    if you didn't do a save after the change, you can also just reboot your VPS, if you have some method to do that supplied by your host.
    Or send a ticket to have them reboot.
    Wouldnt that alter the functioning of my VPN? it has some rules to do some traffic diverting.. I think i have a backup of those rules though

  14. #14
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    Quote Originally Posted by elvis1 View Post
    Wouldnt that alter the functioning of my VPN? it has some rules to do some traffic diverting.. I think i have a backup of those rules though
    If you didn't save the rule afterwards, the quickest way is to just have the server rebooted, you'll find yourself back to business as usual.
    But yes, it would alter your VPN, didn't know you had that running.
    So alternately, just look through the rules in your webmin firewall section, and simply delete anything involving port 25. Or just fix the rule you put there in the first place, either will work.
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  15. #15
    Join Date
    May 2007
    Posts
    1,979
    Would it be safe to uploade a screenshot of the firewalls rules of webmin?

  16. #16
    Join Date
    May 2009
    Posts
    46
    i think that denyhosts caused the problem. if webmin has the option to edit /etc/hosts.deny just remove your ip.

  17. #17
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    I don't think he has that running. He was altering a firewall rule when this happened, from what I gather.
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  18. #18
    Join Date
    May 2007
    Posts
    1,979
    update: tried stoping and starting ssh..I could stop ssh server from webmin ( same problem prevails) but when I try to start it it displays:
    Failed to start SSH server : Starting sshd: PRNG is not seeded
    [FAILED]

  19. #19
    Join Date
    Mar 2009
    Location
    Austin Tx
    Posts
    2,001
    Quote Originally Posted by elvis1 View Post
    update: tried stoping and starting ssh..I could stop ssh server from webmin ( same problem prevails) but when I try to start it it displays:
    Failed to start SSH server : Starting sshd: PRNG is not seeded
    [FAILED]
    in your file manager, do you have a
    /dev/random
    device?
    if so, make sure perms are at least 644
    This is the best signature in the world....Tribute!
    (It is not the best signature in the world, no. This is just a tribute)

  20. #20
    Join Date
    May 2007
    Posts
    1,979
    mapper, net and pts.. inside mapper I do have one called tun ( which I guess is something of tun tap)..
    I requested ( before I saw your post ) the guys from vaserv to reestablish my ssh server without touching iptables

  21. #21
    Join Date
    May 2007
    Posts
    1,979
    server is not pingable

Similar Threads

  1. FTP - Connection closed by remote host.
    By optimumd in forum Hosting Security and Technology
    Replies: 7
    Last Post: 11-28-2006, 09:35 PM
  2. Connection terminates unexpectedly
    By jmaskell in forum Hosting Security and Technology
    Replies: 2
    Last Post: 05-31-2005, 05:33 AM
  3. connection to remote host closed
    By deadlydog in forum Hosting Security and Technology
    Replies: 3
    Last Post: 04-27-2005, 08:56 PM
  4. connection to remote host closed
    By jireh in forum Hosting Security and Technology
    Replies: 9
    Last Post: 05-06-2004, 06:09 PM
  5. RNDC Connection closed...what is the problem?
    By WCHost in forum Hosting Security and Technology
    Replies: 2
    Last Post: 11-13-2003, 04:17 AM

Posting Permissions

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