I'm trying to start a trim command on a bunch of servers remotely since these are appliances and we lose support if you change anything like cron jobs locally.
I'm trying to do this:
ssh [email protected] "nohup fstrim /data &"
That is executed but the problem is the secure shell is kept open despite nohup and everything. Can I force ssh to just drop the command and pull out immediately?
Just found a similar request via google. There it was solved with
screen -d -m ./script
Unfortunately screen isn't available on the appliances.
ssh -fhelp? See stackoverflow.com/questions/29142/…