SFTP with publickey authentication
I have configured the appveyor deployment to use the FTP provider, and selected SFTP. The server to which I wish to deploy will accept publickey auth, and not password. I have followed the technique described at http://www.appveyor.com/blog/2015/01/08/building-private-github-repositories-with-sub-modules to place a suitable private key in c:\users\appveyor\.ssh - the matching public key is deployed on the target server.
The build fails with the following message:
Deploying using FTP provider
Cannot connect SFTP server: No suitable authentication method found to complete authentication (publickey).
However, when I enter an RDP session, I can open a command prompt and if I type "sftp user@server" I can log in successfully. By passing some verbose flags (sftp -vvv .... ) I can see that the files in c:\users\appveyor\.ssh are (as expected) used.
Some questions:
1) Does the FTP provider use a different SFTP implementation than the one I get from the command line?
2) Does it run under a different account?
3) Is there a different location where I might put the private key file with more success?
4) Is there any way to get better diagnostic information by altering my configuration? (I'm working with the web UI rather than the YAML)
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 27 Jun, 2016 05:24 PM
Hi Dominic,
Yes, AppVeyor's built-in SFTP provider uses managed .NET implementation (SSH.NET library to be specific) and it looks like that library does not support authentication with keys.
To use public key for authentication you should use some command line tool, such as
sftporwinscp(can be installed with Chocolatey).Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:06 AM.