SSH command is not executed python

Applications, development tools, FPGA, C, WEB
Post Reply
rafbar
Posts: 4
Joined: Thu Jan 07, 2016 12:45 pm

SSH command is not executed python

Post by rafbar » Sun Mar 12, 2017 5:46 pm

Hi Community

I try to control a redpitaya device over ssh using a python script. My python script looks like this:

from fabric.api import run, env

env.host_string = 'root@192.168.1.110'
env.password = 'root'
run('uptime')
run('hostname')
run('systemctl start redpitaya_scpi &')

The output in the console is:
[root@192.168.1.110] run: uptime
[root@192.168.1.110] out: 16:55:02 up 1:12, 1 user, load average: 0.02, 0.02, 0.05
[root@192.168.1.110] run: hostname
[root@192.168.1.110] out: redpitaya
[root@192.168.1.110] run: systemctl start redpitaya_scpi &
--> no out: when running the systemctl command

It seems like the uptime and hostname command worked but the systemctl command not!!

Does anybody can give me a hint where the error is??

Chrys

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: SSH command is not executed python

Post by Nils Roos » Wed Mar 15, 2017 6:00 pm

Hi,
the systemctl command produces no output when it executed successfully - only in case of errors.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 16 guests