Chapter 7. Programming Across Machine Boundaries

In this chapter, we will cover the following recipes:

  • Executing a remote shell command using telnet
  • Copying a file to a remote machine by SFTP
  • Printing a remote machine's CPU information
  • Installing a Python package remotely
  • Running a MySQL command remotely
  • Transferring files to a remote machine over SSH
  • Configuring Apache remotely to host a website

Introduction

This chapter promotes some interesting Python libraries. The recipes are presented aiming at the system administrators and advanced Python programmers who like to write code that connects to remote systems and executes commands. The chapter begins with lightweight recipes with a built-in Python library, telnetlib. It then brings Paramiko, a well-known remote access library. Finally, the powerful remote system administration library, fabric, is presented. The fabric library is loved by developers who regularly script for automatic deployments, for example, deploying web applications or building custom application binaries.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.127.37