I'm having trouble with an Expect script on Red Hat Enterprise Server 6.10. I would think that the script below would spawn SFTP, then send the password. I'm getting a Password error, which I am guessing is due to lots of escapable characters.
The script below gets me a "permission denied" error. My password ( I changed some characters) is something like r10@4g@$^#a&r*a^^$% . I have tried escaping the 'special' characters with \ and also tried escaping every character (so it looks like \r\1\0\@\4\g\@\$\^\#\a\&\r\*\a\^\^\$\%). When I manually connect to the site and manually enter a password it works fine.
Can someone tell me what I might be missing?
Thanks for any advice you can provide,
spawn sftp firstname.lastname@example.org
expect "username\@ftpprd.host.com\'s password: "