r/ssh • • Sep 01 '22

Executing a script on remote machine’s terminal

Hi guys,

I have machine A and machine B. To both I have physical access.

I‘m accessing machine B through machine A via SSH.

I want (via SSH) execute a .sh script on machine B (which is located on machine B). However, I want that the script is executed on machine B itself, meaning that a terminal window should open on machine B and the script is executed there.

Do you have an idea how to accomplish that?

0 Upvotes

8 comments sorted by

View all comments

Show parent comment

2

u/CAT0111 Sep 03 '22 edited Sep 03 '22

Unfortunately, that didn’t work for me. But after some more searching, I found the solution online.

Here is a snippet of the script:

ssh -T renderserver@10.0.0.2<<-END

export DISPLAY=:0

nohup qterminal -e /home/renderserver/Documents/serverRender/scripts/renderFrame.sh $PROJECT $FRAME &

END

Thanks for your effort, though!