#1
|
|||
|
|||
run ssh command
I am trying to ssh in .. and run the uptime command .. in my loop.
I am missing something i cant run the uptime command or any other strings. def main(): crt.Screen.Synchronous = False with open('/crt_scripts/working/hosts') as hosts_: for host in hosts_: crt.Screen.WaitForString("working # ") crt.Screen.Send("ssh -oStrictHostKeyChecking=no root@" + host + uptime + '\r') crt.Screen.WaitForString("word: ") crt.Screen.Send("mypass" + chr(13)) main() |
Thread Tools | |
Display Modes | |
|
|