it sounds like you havent specified what to run on the remote machineThat was a useful suggestion, when connection via crontab it is missing the very last line of the welcome screen (eg Last login: Tue Dec 10 08:43:21 2024 from 45.159.89.243)Currently you're dumping any useful output to /dev/null. Change that to write to a file and look at that to see if it helps diagnose the issue.
Change the "> /dev/null" to something like "> /tmp/ssh.log 2>&1". Then look at /tmp/ssh.log after booting.
When I run the script directly that last line shows up. At least something to work on but bit baffled at the moment why crontab and running directly differ.
Geoff
so it just spawns a bash prompt on the remote machine, which terminates when stdin EOF's
cron maps stdin to /dev/null, so it instantly EOF's, and closes down the connection!
Statistics: Posted by cleverca22 — Tue Dec 10, 2024 12:08 pm