Jenkins job is getting failed due some $ sign

Hello All,

I am trying to run some docker commands on the remote host. For which i am using sshAgent

stages {
stage (‘Deploy’) {
steps {
script {
sshagent (credentials: [’***********’]) {
sh “”“ssh -ttq ${hostlogin}@${hostname} -o StrictHostKeyChecking=no ‘docker ps -a|awk ‘/authentication-service/ {print $1}’ -’”"""
}
}
}
}
}

The above code is failing with the following error.
{code}
Started by user unknown or anonymous
Running in Durability level: MAX_SURVIVABILITY
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 12: expecting anything but ‘’\n’’; got it anyway @ line 12, column 163.
-service/ {print $1}’ -’""""
{code}

I tried by adding $ still is failing any suggestions plz