Python Forum
Need Help in ssh connection
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Help in ssh connection
#1
Hi All,

                ssh_client=paramiko.SSHClient()
                ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
                ssh_client.connect(hostname = ip, username= user, password = passwd, timeout = 100)
                stdin, stdout, stderr = ssh_client.exec_command("\npower outlets 17 off\n")


I used above lines of code for ssh connection and to execute required command.

This code is working if peer device is in "#" prompt but my device is in ">" prompt & I'm unable to execute command (able to login into device)

Thanks in advance
Reply


Messages In This Thread
Need Help in ssh connection - by hareesh - Oct-01-2018, 10:35 AM
RE: Need Help in ssh connection - by Skaperen - Oct-02-2018, 05:01 AM
RE: Need Help in ssh connection - by Larz60+ - Oct-02-2018, 07:04 AM
RE: Need Help in ssh connection - by hareesh - Oct-04-2018, 07:59 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020