1

It is as the title says. When I try to connect to my sftp server with filezilla it says the following "Disconnected: No supported authentication methods available (server sent: publickey)", however before this message comes a window pops up asking me if I trust the servers host key and I say yes. Futhermore I can't find my .ssh directory anymore which contained the authorized_keys file. I am a little confused. Have anyone of you guys any tips or ideas to solve this issue?

Thanks on beforehand.

  • Well if you have configured SSH to look in ~/.ssh for the authorized_keys file, and it does not exist, you will need to recreate it and re-copy your public key there (or generate a new keypair) – steeldriver Feb 19 '17 at 16:51
  • since I don't know where the keys, I am thinking of generating a new pair of keys but if the keys but if the keys are left somwhere on the server, will they be over written? – KV-2 Feb 20 '17 at 16:35
0

Your server is configured to deny anything else than public key-based authentication.

If you have lost your .ssh (and hence, your RSA, DSA, .... key pair), then you can no longer login to your remote system.

Depending on who's hosting this remote system, you may be able to use some KVM over IP, VNC console, ... reboot the server on some liveCD, ... Point is: if you can't find a copy of your SSH key pair, then you'll have to enable password-based authentication somehow.

  • I will propably make a new pair of keys since I want key-based authentication. – KV-2 Feb 20 '17 at 16:42
-1

Please do not laugh, but make sure that you have not renamed that user's home directory as defined in /etc/passwd. I had long ago and since forgotten about it (I SSH with another account and sudo su over). Finding my error was hours long, but changing the folder name and rebooting was less than 60 seconds.
username:x:1007:1007::/var/www/new_folder:/bin/bash

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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