from man ssh:
- -f
- Requests ssh to go to background just before command execution. This is useful if ssh is going to ask for passwords or passphrases, but the user wants it in the background. This implies -n. The recommended way to start X11 programs at a remote site is with something like ssh -f host xterm.
IOW:
system ssh => 'root@ip' => $command
... and you can drop the "&" in
$command.
[]s, HTH, Massa (κς,πμ,πλ)