Connects and logs into the specified hostname. Arguments that are not
given are guessed from the environment.
|
|
__init__(self,
host,
username=None,
password=None,
private_key=None,
private_key_pass=None,
port=22)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
| _load_rsa_key(self,
private_key,
private_key_pass=None) |
source code
|
|
|
|
| _load_dsa_key(self,
private_key,
private_key_pass=None) |
source code
|
|
|
|
_sftp_connect(self)
Establish the SFTP connection. |
source code
|
|
|
|
remote_file(self,
file,
mode='w')
Returns a remote file descriptor |
source code
|
|
|
|
get(self,
remotepath,
localpath=None)
Copies a file between the remote host and the local host. |
source code
|
|
|
|
put(self,
localpath,
remotepath=None)
Copies a file between the local host and the remote host. |
source code
|
|
|
|
execute(self,
command,
silent=True,
only_printable=False)
Execute the given commands on a remote machine. |
source code
|
|
|
|
close(self)
Closes the connection and cleans up. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
__del__(self)
Attempt to clean up if not explicitly closed. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|