I have to execute some commands on a remote Host, this host will be a "Router". I have never ever done work with RPC calls. Another big problem is that i have to execute these commands from a Django
web based Application. Steps are following:
SSH
"Done!"
How i should start to work on this problem?
How should i create the SSH connection from user profile page to remote host?
For the security reason i want to create a connection using the user private key. I also find some related question but didn't got the right direction :)
You should start with paramiko library, it has not so difficult api. And there are some examples bundled with library.
You can create ssh client, pass hostname, port, username, and user's key file in constructor, create shell, run your command and read commands output, stdout only. You can read stderr separately, or combine it with stdout.