title: How to write the Python Paramiko SFTP using SSH keys
body: <p>I have already written a which has a main method in python which has many operations to create a file.
  Now i want to SFTP that file and send it to an remote server from an local server.
  Can I anyone please assist me how to add an method in python which will first execute the main method and then execute the paramiko method for SFTP purpose. Please teach me a simple code for this. I am very much confused!</p>