FileZilla: no supported authentication method to connect ec2 instance; sublime sftp and ssh are connected

0

1

On local machine (MacOSX10.11.6) get connection to t2.micro instance (ubuntu 16.04) via

public key: ssh2: RSA SHA256:YUIh/.../KRHUuwI4ZrlVA

  • sftp using Sublime Text - sftp (works)

public key: ssh2: RSA SHA256:YUIh/.../KRHUuwI4ZrlVA

Trying to connect via FileZilla(3.25.2) doesn't work.

public key generated by FileZilla: ssh-rss 2048 2a:f3:09: .....

Wasn't able to extract key file. Here is a screenshot: www.boomboxbooking.de/stackq/filezilla.tiff (Sorry, have not enough reputation for posting more than two links)(*)

What I did in FileZilla:

  • preferences -> SFTP -> add new key pair

  • select relevant key pair; filezilla automatically converts format

  • file -> servermanager

  • add server
  • Server: 'ec2***.amazonaws.com'
  • Protokoll: 'SFTP'
  • connection: 'normal'
  • User: 'ubuntu'

Trying to connect filezilla.log

auth.log: www.boomboxbooking.de/stackq/auth.log

(*)

There are a lot of topics like this out there. Most of the time people have no connection, cause of wrong username, host or key. As far as I can see this does not take place here, cause of running connection via other ways.

This might be a hint to solve problem (?):

  • It was tricky to get sftp connection via sublime. The .json file needed following line

    "sftp_flags": ["-i", "/***.pem"]

  • by using a AWS educate starter account I am not able to set the right location. Instead of EU... I have to use US...

Maybe something is wrong with filezilla's use of the key file?

Has someone an idea to get a connection via FileZilla in this case?

mrtaste

Posted 2017-05-04T15:30:28.233

Reputation: 46

As I've asked you before, we need ssh -v ... output and verbose FileZilla log file, not copy of the message log from GUI. And in English please (switch FileZilla language, do not try to translate it) – Martin Prikryl – 2017-05-04T17:04:27.443

@MartinPrikryl: Hope now it is precise enough. Fixed that language mixup. – mrtaste – 2017-05-04T18:52:44.123

Better, but it's still not a verbose log. – Martin Prikryl – 2017-05-04T18:56:24.597

@MartinPrikryl: Thanks for abundance of patience. Verbose log is linked. – mrtaste – 2017-05-04T19:20:08.803

The server rejects the key: "Server refused our key" - Double check that you are using the same key in FileZilla as in ssh. Double check that you are connecting to the same host - What is the public key part of the converted FileZilla key? What is the your authorized_keys entry? Show us SSH server log entries for both FileZilla and ssh authentication. – Martin Prikryl – 2017-05-04T19:45:01.763

@MartinPrikryl: Thanks again. Double checked, but still no connection. Added auth.log to post. I didn't get your 'key questions'. Are they answered by auth.log? – mrtaste – 2017-05-05T06:59:58.573

Tell us what part of the auth.log is for what attempt. Do not make us guess. + There are far to many sessions in the log - post only the relevant parts + For keys: Show us verbatim copy of the public key part of the .pem file you use with FileZilla + Show us verbatim copy of your authorized_keys file. – Martin Prikryl – 2017-05-05T07:03:13.000

@MartinPrikryl: Tried to edit what you need. Thanks again! Was not able to see all of the key created and used by FileZilla. Looks like different format. – mrtaste – 2017-05-05T13:02:09.867

I just want to see the contents of the .pem file (of course without the private key) and the authorized_keys file. + The "FileZilla connection" section of the auth.log seems irrelevant. All it contains are unsuccessful logins by user "pi", while FileZilla log shows use of the "ubuntu" user. – Martin Prikryl – 2017-05-05T13:07:56.350

@MartinPrikryl: I accept that it is confusing to be asked to show key files. But I am in need of help. Anyway. The content of the .pem (created by AWS) only contains RSA PRIVATE KEY. Looks like this www.boomboxbooking.de/stackq/example.pem; I don't know where to find authorized_keys file that you mention I haven't posted yet. Thanks again for your patience! – mrtaste – 2017-05-05T13:33:27.617

You must have added the public key to the authorized_keys, so you must know where it is. Or how did you made the ssh working otherwise? + Re example.pem - I've though that you have converted the .pem to .ppk for use in FileZilla. So please use PuTTYgen to convert it to .ppk and then show us the public part of the .ppk (it has separate public and private parts). – Martin Prikryl – 2017-05-05T13:49:30.153

@MartinPrikryl: Actually I did not put a public key anywhere. EC2 did it by its self while launching the instance. Might be the reason for no known access to a public key. +FileZilla converted the .pem file automatically. In my case there is no more popup etc. asking to convert. Everything is automated after selecting .pem file. +Correct my if I am wrong: are you sure I have to use PuTTYgen on Mac? – mrtaste – 2017-05-05T14:19:52.573

OK, you are right, I've forgot the question is about EC2. It's indeed how the EC2 works. + Using PuTTYgen to convert the .pem to .ppk is one of many ways to extract the public key from the .pem file - Use any way you want, this just seemed the easiest for me. + We still need to see the auth.log records for the FileZilla login attempt. The log you have posted does not show that. – Martin Prikryl – 2017-05-05T14:24:23.690

@MartinPrikryl: Converted .pem to .ppk; FileZilla accepted, no luck, looked like FileZilla did same job before + The auth.log records nearly looked exactly like posted before: FileZilla auth.log What is going wrong? Thank you for deal with that theme! Hope you have a clue.

– mrtaste – 2017-05-05T15:17:50.597

@MartinPrikryl: Found authorized_keys

– mrtaste – 2017-05-05T15:47:00.440

No answers