0

I have a shell script which is trying to login into a box with password having special character.

sshpass  -p"\"$Passw\"" ssh -tt -o StrictHostKeyChecking=no root@"${Hostname}"

I am passing Hostname and Password parameter from Jenkins. Password conatins $ characater for example n$1sachin . But I am not able to login. Can anyone please help?

I tried different option but its not working for me.

0

1 Answer 1

-1

I have encounter similar problem, finally using \ to escape special char in password is work for me, such as:

from xxx)xxx#?xxx to xxx\)xxx\#\?xxx

full command like this:

sshpass -p xxx\)xxx\#\?xxx rsync -avzh ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.