Copying a file is one of the simplest tasks you can do with Junos PyEZ or with Junos in general. You typically do this for example when you are copying the text file for request support information before you submit it to support. Having said that, let's get right into an example of this using Junos PyEZ.
In my last post How To Configure SSH Key-based Authentication on Linux, I gave a walkthrough on how to set up SSH keys with an SSH agent so you get the benefits of passwordless logins while still maintaining the increased security that key-based authentication is supposed to provide. The reason why I reiterate this is because using SSH keys without passphrases pretty much defeats the purpose of using keys at all.
For some time I have been trying different things on how to build a good Network Automation Lab. You would think that this can be as trivial as just your typical GNS3 lab hooked up with some VMs where you can launch your scripts, but in my mind, I wanted something very simple and straightforward, pretty much painless approach to building one. I had a good idea of how this kind of lab should be. Below are the points which guided me in my search for the right kind of setup.