Script setup_ssh
Tool to setup the SSH configuration on a remote node.
This is needed before we can join the node into the cluster.
|
|
|
|
|
|
|
SetupSSH(transport)
Sets the SSH up on the other side. |
|
|
|
|
|
ParseOptions()
Parses options passed to program. |
|
|
|
|
list
|
|
boolean
|
LoginViaKeys(transport,
username,
keys)
Try to login on the given transport via a list of keys. |
|
|
|
|
|
|
Imports:
getpass,
logging,
paramiko,
os,
optparse,
sys,
cli,
constants,
errors,
netutils,
ssh,
utils
_RunRemoteCommand(transport,
command)
|
|
Invokes and wait for the command over SSH.
- Parameters:
transport - The paramiko transport instance
command - The command to be executed
|
_InvokeDaemonUtil(transport,
command)
|
|
Invokes daemon-util on the remote side.
- Parameters:
transport - The paramiko transport instance
command - The daemon-util command to be run
|
_WriteSftpFile(sftp,
name,
perm,
data)
|
|
SFTPs data to a remote file.
- Parameters:
sftp - A open paramiko SFTP client
name - The remote file name
perm - The remote file permission
data - The data to write
|
Sets the SSH up on the other side.
- Parameters:
transport - The paramiko transport instance
|
SetupNodeDaemon(transport)
|
|
Sets the node daemon up on the other side.
- Parameters:
transport - The paramiko transport instance
|
Sets up the logging.
- Parameters:
|
Load the list of available private keys.
It loads the standard ssh key from disk and then tries to connect to
the ssh agent too.
- Returns: list
- a list of
paramiko.PKey
|
LoginViaKeys(transport,
username,
keys)
|
|
Try to login on the given transport via a list of keys.
- Parameters:
transport - the transport to use
username - the username to login as
keys (list) - list of paramiko.PKey to use for authentication
- Returns: boolean
- True or False depending on whether the login was successfull or
not
|
Load the known hosts.
- Returns:
- paramiko.util.load_host_keys dict
|