I can only login to my ec2 instance via Putty/FileZilla if I use the username ubuntu. This is fine for putty as i can then su but in filezilla I am not able to add any files as I am not able to su.

In putty I get the error Disconnected: No supported authentication methods available (server sent: publickey).

In FileZilla I get the message

Error: Disconnected: No supported authentication methods available (server sent: publickey) Error: Could not connect to server

What do I need to look to change here to get this working? Let me know if there is any more info I could provide to help here.

  • Your private .ppk key in putty is probably incorrect. – harrymc Aug 3 '13 at 11:30

First of all, lets quote the wiki:

Importing a site's public key is not supported. It's not possible to pre-cache a public key (which I had obtained as a keyfile from the site's administrator) to verify the server is the one you're trying to connect to. Eventually I had to run ssh-keygen -l -f on a Linux box, then perform a visual comparison.

Once you have understood this, lets assume you have a .ppk file from your Putty installation, which come down to two possible solutions:

Using Pageant

Pageant is a daemon-like agent for storing your private keys saving you the time to put your passwords each time you want to use your stored ssh keys.

  1. You should already have installed Putty, then go to the Putty directory in your Start Menu, and select Pageant.
  2. It should appear a small icon in the notification area (besides the clock), right click it then select Add...
  3. Look for you private key, will ask you for your password, then accept.
  4. Open FileZilla, and it should find Pageant running so it will take your private key and authenticate to your server.

Manual method

In FileZilla:

  1. Go to Edit > Preferences menu.
  2. In the Connection - SFTP tab, look for Add key file... button.
  3. Look for your key and hit Open.

FileZilla will convert this file from Password protected to no password during the importation.

For everything else

FileZilla supports almost any SSH Agent, if the SSH_AUTH_SOCK is set in the environment variables. Please refer to your documentation for your agent in this case.

Source: https://wiki.filezilla-project.org/Howto#SFTP_using_SSH2:_Key_based_authentication

| improve this answer | |
  • Thanks for your advice. I already had the manual method working, my issue is that this only works for the user ubuntu and this user doesn't neccesarrily have access to all these folders. As this is a small project I am just going to manage it by giving ubuntu access to the required folders, probably not the solution for a larger scale team though. – ak85 Aug 10 '13 at 3:15
  • 1
    @ak85 if you are using Ubuntu, you can use the integrated tools for managing SSH keys, like Seahorse. – Braiam Aug 10 '13 at 13:04
  • @ak85 btw, if my answer was answered your question, you should accept it. And if I'm worthy of the bounty award it to me too ;) – Braiam Aug 10 '13 at 23:41
  • 2
    Useful answer, just created step by step instructions video based on answer, y2u.be/e9BDvg42-JI – Yasitha Waduge Nov 1 '13 at 13:05

It happens in AWS EC2. As EC2 provide Connection through an SFTP need some other methods. Firstly the CONNECTION will be in FTP as default. Need to change to SFTP. Then instead of directly giving host name and password, it must be done in Site manager. Step by step procedure given below:

So the steps for troubleshooting:

  1. Go to Filezilla's Settings
  2. SFTP
  3. Add Key File (Give the ppk converted key file or FZ will convert the pem ket)

Then take File in Filezilla Go to

  1. File
  2. Site Manager
  3. New Site
  4. Give any name (ec2-amazon)
  5. In General, give host name 'Public DNS' (eg: ec2-34-423.ap-southeast...)
  6. Change the Protocol to SFTP
  7. Logon Type: Normal
  8. User : ec2-user or ubuntu - depends
  9. Clear Password
  10. Connect!

Hope you will be connected. Happy Hosting...:)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.