pass the correct return code after detach
use sudo and ssh_command are a setting now