BuildCmd(self,
hostname,
user,
command,
batch=True,
ask_key=False,
tty=False,
use_cluster_key=True,
strict_host_check=True,
private_key=None,
quiet=True,
port=None)
| source code
|
Build an ssh command to execute a command on a remote node.
- Parameters:
hostname - the target host, string
user - user to auth as
command - the command
batch - if true, ssh will run in batch mode with no prompting
ask_key - if true, ssh will run with StrictHostKeyChecking=ask, so that we
can connect to an unknown host (not valid in batch mode)
use_cluster_key - whether to expect and use the cluster-global SSH key
strict_host_check - whether to check the host's SSH key at all
private_key - use this private key instead of the default
quiet - whether to enable -q to ssh
port - the SSH port on which the node's daemon is running
- Returns:
- the ssh call to run 'command' on the remote host.
|