Advertisement
Guest User

Untitled

a guest
Apr 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. import time
  2. import paramiko
  3. import getpass
  4. host = "10.10.10.10"
  5. username = "admin"
  6. password = getpass.getpass("Please enter Password:")
  7. c=paramiko.SSHClient()
  8. c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  9. c.connect(host,username=username,password=password)
  10. print "connection to %s established" %host
  11. time.sleep(1)
  12. stdin, stdout, stderr = c.exec_command("scope org db")
  13. output = stdout.read()
  14. print output
  15. time.sleep(2)
  16. stdin, stdout, stderr = c.exec_command('show service-profile')
  17. output = stdout.read()
  18. print output
  19.  
  20. Please enter Password:
  21. connection to 10.10.10.10 established
  22.  
  23. ^
  24. % Incomplete Command at '^' marker
  25.  
  26. ucsm1# scope org db
  27. ucsm1 /org # show service-profile
  28.  
  29. Service Profile:
  30. Service Profile Name Type Server Assignment Association
  31. -------------------- ----------------- ------- ---------- -----------
  32. db/SP-DB1
  33. Instance 8/7 Assigned Associated
  34.  
  35. ucsm1 /org #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement