1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] SSH Library Robot framework - remote python script execution

Discussão em 'Python' iniciado por Stack, Novembro 26, 2025.

  1. Stack

    Stack Membro Participativo

    I am using Robot Framework SSH Library - to perform the following operations.

    1. Connect to a remote machine via SSH
    2. Copy a python file into the remote machine. [The python file obtains the process with the ID specified]
    3. Run the python file using the execute command.

    The issue I am facing is - Execute Command of robot framework does not return a result instead hangs. when I execute the python script via cmd-> ssh@remoteserver-> execute script - it executes perfectly fine.

    below is the source code of the python file and robot framework code.

    command = f"Get-Process -Id {process_id} > {output_file}"
    result = subprocess.run(["powershell", "-Command", command], capture_output=True, text=True)



    I copy the python file from local to remote server via SSH Put File - all this works fine. only the execute command hangs!

    ${status}= Execute Command py ${remote_file_full_path} --id 11064 --output C:\\Sandeep\\process_output.txt


    Any idea how to resolve the same?

    Continue reading...

Compartilhe esta Página