[olug] Old Machine Reboot

Sean Kelly smkelly at zombie.org
Thu Nov 15 16:09:38 UTC 2007


On Thu, Nov 15, 2007 at 09:20:22AM -0600, Tom wrote:
> debug1: Sending command: /sbin/reboot
> Received disconnect from {ip}: 2: Could not create socket pairs: Too many
> open files in system

Looking at session.c in OpenSSH, it looks like you're getting snagged here:

        /* Uses socket pairs to communicate with the program. */
        if (socketpair(AF_UNIX, SOCK_STREAM, 0, inout) < 0 ||
            socketpair(AF_UNIX, SOCK_STREAM, 0, err) < 0)
                packet_disconnect("Could not create socket pairs: %.100s",
                                  strerror(errno));

The problem you have is that this is later in that same function:

                /* Do processing for the child (exec command etc). */
                do_child(s, command);
                /* NOTREACHED */

I don't think you're going to manage to get SSH to execute anything,
including shell built-ins like `kill`. It looks to be puking before it
even manages to setup your environment, group memberships, and setting
cwd to your home directory. It doesn't get to the part where it forks
off a child to run a shell or command of any kind.

I think you may be pretty much out of luck here.

-- 
Sean Kelly          | PGP KeyID: D2E5E296
smkelly at smkelly.org | http://www.smkelly.org



More information about the OLUG mailing list