Reputation: 11
We are using Putty v0.62 through a tool on on Windows 2008 R2 Standard Edition and connecting to an external server using SSH version 2. We see that the following command works
psftp.exe Host -l Username –pw -2 -batch -l Username -i PrivateKeyLocation
but the following doesn't
psftp.exe Host -l Username –pw –batch -2 -l Username -i PrivateKeyLocation
Please help us to understand this problem and suggest a solution.
All comments are welcomed but keep in mind that our tool has a limitation of changing the sequence to -2 -batch
.
Upvotes: 1
Views: 261
Reputation: 2226
Did you type these commands into the terminal, or did you copy and paste them from somewhere? The reason I ask is because of the hyphens. In the first line, the "hyphen" before pw is not a hyphen, nor are the "hyphens" before "pw" and "batch" in the second line. The characters that I've pointed out actually translate to ascii 8211 "en dash".
Hyphen characters are often converted to this character by word processors or wysiwyg HTML editors. This makes it near impossible at times to copy and paste command lines from web sites. Try typing the commands manually and see if it works.
It could also be that SO has converted the characters in your question for you, but I think that quite unlikely.
Upvotes: 1