Working with Remote Directories Using os and Paramiko

This is a self-paced GK Digital Learning product. GK Digital learning products are created by world-class production and instructional design teams to deliver an experience that feels more like a classroom than traditional e-learning with hands-on activities for real-world results. In addition to high quality video content and hands-on labs you will have access to subject matter experts to ask questions for feedback and support.

In this course, you will learn how to discover and manipulate files, both locally and on a remote server. Paramiko and OS help you examine and move files between two systems.

The OS module, available in the Python standard library, provides a portable way of using operating system dependent functionality, including: Query and modify environment variables, Examine local files and directories and their attributes, Manipulate paths.

Paramiko is a combination of the Esperanto words for paranoid and friend. It's an open-source, third-party package that implements the SSHv2 protocol for a secure (encrypted and authenticated) connection to a remote server. Paramiko establishes an SFTP client to perform a variety of services, including transferring files between systems.

This course is available as a subscription for a three-month period beginning at the time of purchase. It includes all course releases, updates, as well as 90 days of instructor support.

You can also purchase this course as part of the Python Developer Bundle or Developer Collection.


  • A basic understanding of the Python language and standard library
  • Familiarity with SSH v2 protocol and file system permissions


1. Work with Files and Processes on Your Workstation
2. Work with Files on a Remote Server


What You'll Learn

  • Discover content of a directory on the workstation
  • Retrieve file attributes
  • Determine existence of a file or directory
  • Obtain process parameters
  • Connect to a remote server with username and password
  • Passwordless connection to a remote server
  • Obtain attributes of a file on a remote server
  • Determine existence of a file
  • Upload files from local workstation to remote server
  • Download files from remote server to local workstation

Target Audience

Python developers, Systems engineers, Sysops who needs to automate movement of files between two systems.