'A vboxmanage command with ssh returns the usage. How to actually have the command executed?

I have a pipeline, where I need to power off and delete a virtualbox vm which is running on a remote host, so I can reimport it. But the commands show the vboxmanage help/usage, when using ssh but not locally. (EDIT: Actually, this is independent from Jenkins. It happens in local machine.) Why is this happening? Or, how can this be fixed?

The pipeline part is:

steps {
               script {
                    withCredentials([sshUserPrivateKey(credentialsId: 'sshUser', keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'userName')]) {
                      remote.user = userName
                      remote.identityFile = identity
                      sh "ssh -o StrictHostKeyChecking=no -i $remote.identityFile $remote.user@$remote.host /bin/bash -c 'vboxmanage controlvm myvboxname poweroff'"
                      sh "ssh -o StrictHostKeyChecking=no -i $remote.identityFile $remote.user@$remote.host /bin/bash -c 'vboxmanage unregistervm myvboxname --delete'"
                      sh "ssh -o StrictHostKeyChecking=no -i $remote.identityFile $remote.user@$remote.host /bin/bash -c 'myshellscript.sh'"
                    }
                }
            }

This is the output:

ssh -o StrictHostKeyChecking=no -i **** ****@10.0.xxx.xx /bin/bash -c 'vboxmanage controlvm myvboxname poweroff'
Oracle VM VirtualBox Command Line Management Interface Version 6.1.32
(C) 2005-2022 Oracle Corporation
All rights reserved.

Usage:

      VBoxManage [<general option>] <command>
(...)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source