Python script - connect to SSH and run command

Ilias picture Ilias · Feb 4, 2011 · Viewed 69.3k times · Source

I already know there are ssh modules for Python, that's not for what I'm looking for. What I want to have is an python script to do the following:

  1. > connect to an [ input by user ] SSH host
  2. > connect using the credentials [ provided by the user ]
  3. > run command on the SSH host [ telnet to [host - input by user ]
  4. > Select menu item in the telnet session

Thanks in advance,

Best regards,

Answer