linux - how to issue command to server and issue a command with a delay for 5sec to DUT using single python file -
i want start linux server , issue command wait 5seconds , issue command on dut using python script.
is possilbe within single python script or if @ use 2 python script how it?
this doing
1)i have set ssh login withut password - working fine
2)start server command "ssh -i ~/.ssh/id_rsa server_name@ip-address < command >" - working fine
3)wait 5second - working fine
4)need start dut command - not working :(
please me find solution using python
not sure mean dut, commands accepted ssh command parametr:
$ ssh -i ~/.ssh/id_rsa server_name@ip-address command
and if want run command, wait , run second command, easiest way be:
$ ssh -i ~/.ssh/id_rsa server_name@ip-address "command1; sleep 5; command2"
Comments
Post a Comment