While automating a remote system administration task using Fabric, if you want to transfer files between your local machine and the remote machine with SSH, you can use the Fabric's built-in get() and put() functions. This recipe shows you how we can create custom functions to transfer files smartly by checking the disk space before and after the transfer.
Transferring files to a remote machine over SSH
Getting ready
This recipe also needs Fabric to be installed first. You can install Fabric using Python packing tools, pip or easy_install, as shown in the following command:
$ pip install fabric
Here, we will connect the remote host using the SSH protocol. So, it's necessary to install and run the SSH server on...