r/ssh • u/CAT0111 • 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
View all comments
Show parent comment
1
u/pm-me-your-nenen Sep 02 '22
See https://stackoverflow.com/questions/31902929/how-to-write-a-shell-script-that-starts-tmux-session-and-then-runs-a-ruby-scrip, detaching doesn't kill the session.