Skip to content Skip to sidebar Skip to footer

How To Execute Commands In A Remote Server Using Python?

This question is related to this other one: How to use sockets to send user and password to a devboard using ssh I want to connect to the devboard in order to execute a script. All

Solution 1:

I guess you have to change the

if channel_data.endswith('mendel@undefined-eft:~$'):

to

if channel_data.endswith('mendel@undefined-eft:~$ '):

according to your prompt. Please note the space after :~$

Post a Comment for "How To Execute Commands In A Remote Server Using Python?"