SSH problems - server unexpectedly closed network connection

7,414

The documentation of the setresuid system call has this explanation:

ERRORS
       EAGAIN uid  does  not  match  the current UID and this call would bring
              that user ID over its RLIMIT_NPROC resource limit.

In other words you are trying to login as a user, who already has the maximum of allowed processes. Login as another user should still work and allow you to find out what processes are running as the first user.

Share:
7,414

Related videos on Youtube

user219682
Author by

user219682

Updated on September 18, 2022

Comments

  • user219682
    user219682 over 1 year

    Since yesterday I have problems connecting to my server using SSH/SFTP. I can only connect after a restart of my server. When I try to make a connection after a couple of minutes, I can no longer make an SSH connection. I get the error "server unexpectedly closed network connection". SSH connections that are already open stay open. My server has CentOS 6 on it.

    Furthermore varnish keeps crashing seemingly randomly, which means my sites get down.

    In my SSH error log I get the error:

    fatal: setresuid 500: Resource temporarily unavailable
    pam_unix(sshd:session): session closed for user
    

    Any ideas what the problem may be? Thanks

    • MadHatter
      MadHatter about 10 years
      My guess would be that this is a virtual server, and it's running out of memory. Without quite a lot more information, it's hard to tell.
    • Jenny D
      Jenny D about 10 years
      Did you look in any of the server logs?
    • user219682
      user219682 about 10 years
      Not a virtual server. 32Gb of memory and I'm not running out of memory. I am no going to do a complete hardware swap, except for the hard drive. Hope that helps. Server logs weren't very helpful, only thing I could see that varnish was crashing.