Remote call sonar-scanner prompt error “sonar-scanner: command not found”

Did you try to execyte ssh xxx@xxx /full/path/to/sonar-scanner? I think the problem can be caused by path configuration of your ssh xxx user.