sshspawner/sshspawner.py
async def stop(self, now=False):
        """Stop the remote single-user server process for the current user.

        For the SSHSpawner, this means first attempting to stop the remote
        notebook and then killing the tunnel process (which should die once
        the notebook does).

        The `jupyterhub-singleuser` command has been modified to periodically
        poll the hub for contact and authorization. Failing these, it should
        think itself orphaned and shut itself down.
        """

        status = await self.poll()
        if status is not None and status != 255:
            return
        self.log.info(
            f"Stopping user {self.user.name}'s notebook at port {self.port} on host {self.ssh_target}"
        )
        self.log.debug(f"{self.resource_path}")

        stop_child = self.spawn_as_user(
            f"ssh {self.ssh_opts(known_hosts=self.known_hosts)} {self.ssh_target} {os.path.join(self.resource_path, self.stop_notebook_cmd)}"
        )
        stop_child.expect(pexpect.EOF)
        ret_code = stop_child.wait()
        if ret_code == 0:
            self.log.info("Notebook stopped")

        if self.pid > 0:
            self.log.debug("Killing %i", self.pid)

            await self._signal(signal.SIGKILL)

        # close the tunnel
        os.remove(self.ssh_socket)
Stop the remote single-user server process for the current user.

        For the SSHSpawner, this means first attempting to stop the remote
        notebook and then killing the tunnel process (which should die once
        the notebook does).

        The `jupyterhub-singleuser` command has been modified to periodically
        poll the hub for contact and authorization. Failing these, it should
        think itself orphaned and shut itself down.
        
Stop the remote single-user server process for the current user.
For the SSHSpawner, this means first attempting to stop the remote
notebook and then killing the tunnel process (which should die once
the notebook does).

The `jupyterhub-singleuser` command has been modified to periodically
poll the hub for contact and authorization. Failing these, it should
think itself orphaned and shut itself down.
Stop the remote single - user server process for the current user . For the SSHSpawner this means first attempting to stop the remote notebook and then killing the tunnel process ( which should die once the notebook does ) . The ` jupyterhub - singleuser ` command has been modified to periodically poll the hub for contact and authorization . Failing these it should think itself orphaned and shut itself down .
async def stop(self, now=False):
        status = await self.poll()
        if status is not None and status != 255:
            return
        self.log.info(
            f"Stopping user {self.user.name}'s notebook at port {self.port} on host {self.ssh_target}"
        )
        self.log.debug(f"{self.resource_path}")
        stop_child = self.spawn_as_user(
            f"ssh {self.ssh_opts(known_hosts=self.known_hosts)} {self.ssh_target} {os.path.join(self.resource_path, self.stop_notebook_cmd)}"
        )
        stop_child.expect(pexpect.EOF)
        ret_code = stop_child.wait()
        if ret_code == 0:
            self.log.info("Notebook stopped")
        if self.pid > 0:
            self.log.debug("Killing %i", self.pid)
            await self._signal(signal.SIGKILL)
        os.remove(self.ssh_socket)
async def stop ( self , now = False ) : status = await self . poll ( ) if status is not None and status != 255 : return self . log . info ( f"Stopping user {self.user.name}'s notebook at port {self.port} on host {self.ssh_target}" ) self . log . debug ( f"{self.resource_path}" ) stop_child = self . spawn_as_user ( f"ssh {self.ssh_opts(known_hosts=self.known_hosts)} {self.ssh_target} {os.path.join(self.resource_path, self.stop_notebook_cmd)}" ) stop_child . expect ( pexpect . EOF ) ret_code = stop_child . wait ( ) if ret_code == 0 : self . log . info ( "Notebook stopped" ) if self . pid > 0 : self . log . debug ( "Killing %i" , self . pid ) await self . _signal ( signal . SIGKILL ) os . remove ( self . ssh_socket )
Stop the remote single-user server process for the current user.
Stop the remote single - user server process for the current user .
"""Stop the remote single-user server process for the current user.

        For the SSHSpawner, this means first attempting to stop the remote
        notebook and then killing the tunnel process (which should die once
        the notebook does).

        The `jupyterhub-singleuser` command has been modified to periodically
        poll the hub for contact and authorization. Failing these, it should
        think itself orphaned and shut itself down.
        """ # close the tunnel
self
now