Skip to Content
Mastering Python for Networking and Security
book

Mastering Python for Networking and Security

by José Manuel Ortega
September 2018
Intermediate to advanced
426 pages
10h 46m
English
Packt Publishing
Content preview from Mastering Python for Networking and Security

Chapter 7: Interacting with FTP, SSH, and SNMP Servers

  1. 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’)

  1. What method of the ftplib module allows it to list the files of an FTP server?

FTP.dir()

  1. 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’)

  1. 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()

  1. How do we log in to an SSH server with an RSA ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Python for Networking and Security - Second Edition

Mastering Python for Networking and Security - Second Edition

José Manuel Ortega
Python for Cybersecurity

Python for Cybersecurity

Howard E. Poston, III

Publisher Resources

ISBN: 9781788992510Supplemental Content