Topic "can't connect with putty ppk"

Author Message
random512

Guest


Hello, I installed WinSCP. As part of the installation process, it asked to import my putty configuration and I confirmed. However, if I try to connect through WinSCP with a saved session settings file from Putty then WinSCP returns the following error:

"Disconnected: No supported authentication methods available (server sent: publickey)"

Any idea what might be causing this error and how to fix?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Guest




About this issue, I know how to reproduce this, at least in the portable versions I use (both WinSCP and Putty from PortableApps.com).

Just create in Putty a profile with EXACTLY the same name as the one you are using with WinSCP, then start putty from the WinSCP session and that's it, errors in supported authentication methods.

If you just remove (or rename in a different way) that Putty profile, launching it from WinSCP works without issues.
Guest




sorry, with "profile" I was meaning "session"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Anonymous wrote:
then start putty from the WinSCP session and that's it, errors in supported authentication methods.

Do you get the error in PuTTY or WinSCP?
Guest




Yeah, it's a Putty error actually... after the console opens it gives that popup...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
It's actually by design.
If there's a PuTTY session with the same name as the current WinSCP session, WinSCP opens that PuTTY session. It won't export its settings to PuTTY.
If the PuTTY session is not configured correctly, it just won't work.
See http://winscp.net/eng/docs/integration_putty#putty_session_configuration
Guest




prikryl wrote:
It's actually by design.
If there's a PuTTY session with the same name as the current WinSCP session, WinSCP opens that PuTTY session. It won't export its settings to PuTTY.
If the PuTTY session is not configured correctly, it just won't work.
See http://winscp.net/eng/docs/integration_putty#putty_session_configuration


Thanks for pointing this out, anyway, the Putty sessions are configured correctly...

Putty (launched by itself) works with that session
WinSCP works with it's session with the same name

WinSCP opening a Putty terminal with the common-named session gives the error

now that I think of it, I wonder if the issue could be caused by the path referenced for the ssh key file...
While Putty needs ".\Data\key.ppk", WinSCP uses "..\..\Data\key.ppk", so both programs are pointing at the same file with a different path
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Post PuTTY event logs both for the failing session started from WinSCP and the working session started from PuTTY itself.
Guest




It's indeed a path issue (while using relative paths), also the "putty.log" was written in two different paths:

Launched from Putty:
.\PortableApps\PuTTYPortable\putty.log

(I removed some info from the logs, like username/domain and IP)
Code:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.05.27 17:12:16 =~=~=~=~=~=~=~=~=~=~=~=
Using username "XXXX".
Authenticating with public key "rsa-key-XXXXXXXX"
Last login: Fri May 27 17:05:52 2016 from XX.XX.XXX.XXX

]0;XXXX@XXXX:~[?1034h[XXXX@XXXX ~]# exit
logout


Launched from WinSCP:
.\PortableApps\WinSCPPortable\App\winscp\putty.log

Code:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.05.27 17:13:45 =~=~=~=~=~=~=~=~=~=~=~=
Unable to use key file ".\Data\key.ppk" (unable to open file)
Using username "XXXX".



Maybe a possible solution could be to make WinSCP change the working directory to the one where Putty is installed, before launching it ?

Anyway, thank you for the interest and all the work with WinSCP, could be cool to have all the sessions with the same name everywhere, but it's not at all a top priority thing, it's easy to workarond this issue, I just have to remember to not name putty and winscp session the same Wink
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Anonymous wrote:
Maybe a possible solution could be to make WinSCP change the working directory to the one where Putty is installed, before launching it ?

This request has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=1430

Can you send me an email, so I can send you back a development version of WinSCP for testing? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
tempo
[View user's profile]

Joined: 2016-07-22
Posts: 1
Hi, sent a mail, it is titled as this topic.

Thanks
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License