Originally posted by davecom:
Hi, I just set up an internet radio server using Shoutcast and FreeBSD. I want to login from my Mac OS X machine and be able to start a process on the FreeBSD machine and leave it running after I close the SSH connection. How can I do it?
Try screen instead.
You can start a screen session remotely after logging in via ssh with the simple command 'screen'. Then you can execute whatever commands you like (as in a regular shell). Then you can detach the screen session with a Ctrl-A-D and logout.
You can re-attach to the same screen session either locally or remotely with a simple 'screen -r' and everyhting will be exactly as you left it. You can also start multiple screen sessions.
I use it all the time for starting long running commands from home like backups and database indexing (can take hours even days).
Example:
ssh root@someserver
screen
su - indexer
sh runindexer.sh
Ctrl-A-D
exit
Some time and some place later:
ssh root@someserver
screen -r
do some stuff
Ctrl-A-D
exit
Note: user indexer does not have a login shell.
To end a screen session simply exit from within it. If you forget to de-attach the session before leaving home (I often do this) just type 'screen -d' then 'screen -r'.
I think it comes with Jaguar, it is also available via fink.
See:
http://www.macosxhints.com/article.p...ery=gnu+screen
for more info.