codebots.bots.sshbot.sshBot#
- class codebots.bots.sshbot.sshBot(alias=None, config_file=None, **kwargs)[source]#
sshBot to help with ssh connections to a server.
- Parameters:
- hostnamestr
ip address of the server, by default None.
- usernamestr
username on the server, by default None.
- passwordstr
password on the server, by default None.
- pvtkeystr
path to the private RSA key file, by default None.
- Attributes:
- hostnamestr
ip address of the server, by default None.
- usernamestr
username on the server, by default None.
- passwordstr
password on the server, by default None.
- pvtkeystr
path to the private RSA key file, by default None.
- ssh_clientobj
paramiko SSHClient object, if a connection is active, otherwise None.
- sftp_clientobj
paramiko SFTPClient object, if a connection is active, otherwise None.
Methods
Connect to the server through SFPT on port 22.
Establish the ssh connection
execute_cmds
(commands[, close_connection, ...])Execute general command on the server side
get_folder_from_server
(path, dest[, ...])Retrieve the content of a folder from the server.