When I try to login to a remote server with special characters in the password, it throws a 'Password Refused'
error. However, it works for the password without special characters.
My code:
import pxssh
s = pxssh.pxssh()
s.login('mylabserver4.com', 'testuser', 'Tes123P@ss')
But, I am getting 'Password refused'
error even though the password is correct.
How do I get the code to accept special characters?
Try escaping special character
@
with\
s.login('mylabserver4.com', 'testuser', 'Tes123P\@ss')
Ideal way should be to ask for the user prompt as per the documentation as well: