Take the 2-minute tour ×

I am using tcl8.5 on windows 7. I need to use spawn with openssh. The username has double-quotes (e.g. abc"). I can use openssh to login the remote device with this account when I am using it in a command window:

D:\Program Files\OpenSSH\bin>ssh -labc"\""

... abc"@'s password:

(the correct username is displayed by openssh)

However, when I use spawn ssh with the same syntax in a script, the " is translated to \ When I enter the correct password, access is denied.

exp_spawn "$sshClient" "" -labc\"\\\"\"

The following attempt also shows " being translated to \

exp_spawn "$sshClient" "" -labc\"

Could anyone show me the correct syntax please? Or is there any option in exp_spawn I need to enable?

share|improve this question
add comment

1 Answer


exp_spawn $sshClient {-labc"}
share|improve this answer
add comment

Your Answer


