- How do we connect to an FTP server using the ftplib module through the connect() and login() methods?
ftp = FTP()
ftp.connect(host, 21)
ftp.login(‘user’, ‘password’)
- What method of the ftplib module allows it to list the files of an FTP server?
FTP.dir()
- Which method of the Paramiko module allows us to connect to an SSH server and with what parameters (host, username, password)?
ssh = paramiko.SSHClient()
ssh.connect(host, username=’username’, password=’password’)
- Which method of the Paramiko module allows us to open a session to be able to execute commands subsequently?
ssh_session = client.get_transport().open_session()
- How do we log in to an SSH server with an RSA certificate from which we've found out the route and password?
rsa_key= RSAKey...