I did this:
ssh -f user@host "screen -dm -S screenName"
Now I want to add a bash script command to this line so that the command is executed then the screen detaches.
so I want to do so
ssh -f user@host "screen -dm -S screenName bash bashing.sh"
#!/bin/bash echo "testing it";
but actually nothing happens when I run the command over ssh.
Even when I just from the server run this command only
screen -dm -S screenName bash bashing.sh.
I tried everything so far in the answers and comments and even in the suggested question as duplicate but nothing works for me, so any help would be still very appreciated.