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
hostname str

ip address of the server, by default None.

username str

username on the server, by default None.

password str

password on the server, by default None.

pvtkey str

path to the private RSA key file, by default None.

Attributes
hostname str

ip address of the server, by default None.

username str

username on the server, by default None.

password str

password on the server, by default None.

pvtkey str

path to the private RSA key file, by default None.

ssh_client obj

paramiko SSHClient object, if a connection is active, otherwise None.

sftp_client obj

paramiko SFTPClient object, if a connection is active, otherwise None.

Methods

connect_sftp_client ()

Connect to the server through SFPT on port 22.

connect_ssh_client ()

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.