2

I've created a PuTTY session using a private key (no passphrase) that connects flawlessly from PuTTY . However, when I connect via Plink, loading the same session on the same machine, specifying the same username, I get the "No supported authentication methods available" message. Any ideas? I need to use plink from a CLI without going through the PuTTY GUI. I installed putty-0.62-installer in Win 2008.

Here's the CLI string I'm using:

c:\progra~2\putty\plink -ssh -load mysessionname -l user.name 

Result:

Server refused our key
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Brian Wilson
  • 29
  • 1
  • 2
  • I asked Captain Obvious and he said its because Plink does not support any of the authentication methods offered by the server. – Havenard Jul 17 '13 at 01:28
  • 2
    Would you ask the good Captain to read the entire post, especially the part that says... "I've created a putty session using a private key (no passphrase) that connects flawlessly from putty. However, when I connect via plink, loading the same session on the same machine, specifying the same username, I get the No supported authentication methods available message." -- emphasis on the word SAME – Brian Wilson Jul 17 '13 at 01:51
  • My assumption, and yes I know the pitfalls of assuming anything, that's why I'm asking, is that plink uses all the connection configuration saved in the putty session, so that if the session connects flawlessly from a session in putty, using the same session in plink (on the same machine, et al) would have the same result. Please ask the Captain for an explanation of why I've made a poor assumption. Thanks. – Brian Wilson Jul 17 '13 at 01:54
  • What you are not understanding is that perhaps PuTTY supports something Plink doesn't and thats why it works. – Havenard Jul 17 '13 at 02:25
  • 5
    Havenard: "perhaps". Not helpful. – Niels Abildgaard Dec 06 '13 at 11:56
  • 1
    have u solved this issue? im having same problem. – GeneCode Nov 08 '18 at 01:00
  • 1
    @GeneCode I solved it by using the `-i` command line option, like so: `plink -i C:\path\to\private-key.ppk -ssh root@xx.xx.xx.xx`. (I found that advice in section 12 of [this page](https://www.thegeekstuff.com/2017/05/putty-plink-examples/).) – Josh O'Brien Mar 14 '19 at 20:42

1 Answers1

-1

I had the same problem, but solved it the same way that @GeneCode did - Somehow plink wasn't using pageant and I had to specify the private key on the command line. I also tried it with superputty and still had to define the private key with the -i parameter when calling plink.exe, even though I specified the private key in auth, and enabled "allow agent forwarding" and "attempt authentication using Pageant."

All of this worked without -i before, but something changed and now I have to use -i with plink.

user70323
  • 9
  • 1