The only programming language which I used in my life Was C++ and that was in my first year B.tech(17 years before).After that I never tried programming. During the Covid-19 lockdown I started learning python for Cisco Devnet certifications. I started falling in love with coding. The way I used to work changed with network programmability. I am still learning and trying new things each day. For Cisco Partner Innovation Challenge 2020 I tried something using iPhone and would like to share a small piece of it in this blog.
when I started network automation I look in to all possible options of automation. Exploring iPhone, I come across an awesome app called shortcut. its not just for automating our daily activities, it can also be used for networking. Shortcut app can be used for connecting network devices using SSH(telnet not possible) and run few commands. Apple introduced shortcut in iOS 13 and it has more features in IOS 14. we can run the shortcuts using “HEY SIRI”.
With the command “HEY SIRI Run Office Backup” The below script iterate a list of IP address and connect with SSH and issue the command “SHOW RUN”. The output will be saved in icloud drive. At the end, script will archive the files in Backup folder and share the link to download the archive file by email.
if you change the command to SHOW TECH” it will collect the show tech file from the devices and do the same.
Note:- in the below script we are uploading the files to iCloud and it depends on the internet speed. if you don’t have a proper connectivity, you can add WAIT command before GET FILE COMMAND and SEND COMMAND.