sshspawner/sshspawner.py
def ssh_opts(self, persist=180, known_hosts="", batch_mode=True, other_opts=None):
        """Default set of options to attach to ssh commands

        The minimum arguments are a good, known_hosts file and enabling
        batch mode. The known_hosts file avoids user's known_hosts files
        which may not trust other hosts. Batch mode will cause ssh to fail
        on prompting for a password.

        This implementation also uses ssh ControlMaster to speed up and
        simplify repeated operations over SSH.
        """

        opts = {
            "ControlMaster": "auto",
            "ControlPath": "/tmp/sshspawner-%u@%n",
            "ControlPersist": persist,
            "BatchMode": batch_mode,
        }

        if known_hosts:
            opts["UserKnownHostsFile"] = known_hosts
        else:
            self.log.warning("Skipping host key check")
            opts["StrictHostKeyChecking"] = "no"

        if other_opts:
            opts.extend(other_opts)

        return f"-T " + " ".join([f"-o {opt}={val}" for opt, val in opts.items()])
Default set of options to attach to ssh commands

        The minimum arguments are a good, known_hosts file and enabling
        batch mode. The known_hosts file avoids user's known_hosts files
        which may not trust other hosts. Batch mode will cause ssh to fail
        on prompting for a password.

        This implementation also uses ssh ControlMaster to speed up and
        simplify repeated operations over SSH.
        
Default set of options to attach to ssh commands
The minimum arguments are a good, known_hosts file and enabling
batch mode. The known_hosts file avoids user's known_hosts files
which may not trust other hosts. Batch mode will cause ssh to fail
on prompting for a password.

This implementation also uses ssh ControlMaster to speed up and
simplify repeated operations over SSH.
Default set of options to attach to ssh commands The minimum arguments are a good known_hosts file and enabling batch mode . The known_hosts file avoids user ' s known_hosts files which may not trust other hosts . Batch mode will cause ssh to fail on prompting for a password . This implementation also uses ssh ControlMaster to speed up and simplify repeated operations over SSH .
def ssh_opts(self, persist=180, known_hosts="", batch_mode=True, other_opts=None):
        opts = {
            "ControlMaster": "auto",
            "ControlPath": "/tmp/sshspawner-%u@%n",
            "ControlPersist": persist,
            "BatchMode": batch_mode,
        }
        if known_hosts:
            opts["UserKnownHostsFile"] = known_hosts
        else:
            self.log.warning("Skipping host key check")
            opts["StrictHostKeyChecking"] = "no"
        if other_opts:
            opts.extend(other_opts)
        return f"-T " + " ".join([f"-o {opt}={val}" for opt, val in opts.items()])
def ssh_opts ( self , persist = 180 , known_hosts = "" , batch_mode = True , other_opts = None ) : opts = { "ControlMaster" : "auto" , "ControlPath" : "/tmp/sshspawner-%u@%n" , "ControlPersist" : persist , "BatchMode" : batch_mode , } if known_hosts : opts [ "UserKnownHostsFile" ] = known_hosts else : self . log . warning ( "Skipping host key check" ) opts [ "StrictHostKeyChecking" ] = "no" if other_opts : opts . extend ( other_opts ) return f"-T " + " " . join ( [ f"-o {opt}={val}" for opt , val in opts . items ( ) ] )
Default set of options to attach to ssh commands
The minimum arguments are a good, known_hosts file and enabling
batch mode.
Default set of options to attach to ssh commands The minimum arguments are a good known_hosts file and enabling batch mode .
"""Default set of options to attach to ssh commands

        The minimum arguments are a good, known_hosts file and enabling
        batch mode. The known_hosts file avoids user's known_hosts files
        which may not trust other hosts. Batch mode will cause ssh to fail
        on prompting for a password.

        This implementation also uses ssh ControlMaster to speed up and
        simplify repeated operations over SSH.
        """
self
persist
known_hosts
batch_mode
other_opts