Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Username not Working with Session Options when SSH Private Key Auth Utilized

Please post your code and corresponding session log file (Session.SessionLogPath).
testval123

Username not Working with Session Options when SSH Private Key Auth Utilized

Hello,

If I use username/password combination, the script opens with Username as expected, ie. open sftp://user:**@sftp.blah.com:22

However, if I specify SshPrivateKeyPath, it does NOT utilize the username and instead attempts to prompt for it, even if the username is specified in the SessionOptions properties.

Ie. open sftp://blah.com:22
...

Username:   (Password: NO, Key file: Yes, Passphrase: Yes)
..
Reading key file"blah.ppk"
Prompt (username, "SSH login name", <no instructions>, "login as:"
Prompting user for credentials.
Prompt cancelled.
User aborted at username prompt
Attempt to close connection due to fatal exception:
**Credentials were not specified**

Why does the username/password work, and not the SSH Key?