Page 1 of 1

Yubikey on Linux (Fedora)

Posted: 2020-03-18 21:45
by thetestspecimen
Hi,

I use Filezilla on both Windows and Fedora (a version of Linux). On Windows I have no problem using sftp to login to my webserver using a yubikey. The setup uses SFTP on port 22 with "Interactive" as the logon type. This method then prompts me for the Yubikey pin and then logs me in.

However, on Fedora (using the latest version from the repository as recommended, in this case 3.45.1) I am unable to use a Yubikey to login. I get the following error:

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

This is with the same Filezilla setup as mentioned for windows, so if anyone has any idea what I could try that would be great (or maybe this feature doesn't work on Linux yet?).

Just for further info please note the following:

1) I can SSH and SFTP into my server using the yubikey from a terminal (commandline)
2) I can SFTP into the server from Filezilla using a key file with the same private key info as the yubikey has

One final piece of information, that may or may not help, is that before I can log in using SSH on the commandline I have to run the following 3 commands, or I will get the exact same error as mentioned above:

sudo killall gpg-agent
sudo killall ssh-agent
eval $( gpg-agent --daemon --enable-ssh-support )

If you need any further info let me know.

Thanks

thetestspecimen

Re: Yubikey on Linux (Fedora)

Posted: 2020-03-18 22:42
by boco
using the latest version from the repository as recommended, in this case 3.45.1
Linux repository versions are third-party repackages and not supported here. Support is provided by the repository package distributor/maintainer.

You would need to get the latest Linux version from here, re-test, and come back if it still won't budge.

Re: Yubikey on Linux (Fedora)

Posted: 2020-03-19 06:14
by thetestspecimen
boco wrote:
2020-03-18 22:42
You would need to get the latest Linux version from here, re-test, and come back if it still won't budge.
Ok. I will give it a go and report back.

Re: Yubikey on Linux (Fedora)

Posted: 2020-03-19 08:21
by botg
thetestspecimen wrote:
2020-03-18 21:45
One final piece of information, that may or may not help, is that before I can log in using SSH on the commandline I have to run the following 3 commands, or I will get the exact same error as mentioned above:

sudo killall gpg-agent
sudo killall ssh-agent
eval $( gpg-agent --daemon --enable-ssh-support )
Looks like your default SSH agent isn't loaded or configured correctly. Try starting FileZilla from the terminal after executing those commands.

Re: Yubikey on Linux (Fedora)

Posted: 2020-03-19 08:24
by thetestspecimen
botg wrote:
2020-03-19 08:21
Looks like your default SSH agent isn't loaded or configured correctly. Try starting FileZilla from the terminal after executing those commands.
Thanks for the suggestion. Sounds sensible. I will give this a shot when I get back home.

Re: Yubikey on Linux (Fedora)

Posted: 2020-03-19 15:58
by thetestspecimen
OK so botg nailed it. Greatly appreciated!

For anyone else who finds this thread with a similar problem here is what to do (I am of course assuming you have working ssh in a terminal to begin with, and filezilla installed):

Run:

Code: Select all

sudo killall gpg-agent
sudo killall ssh-agent
eval $( gpg-agent --daemon --enable-ssh-support )
filezilla
Filezilla will then open.

The settings you need in Site Manager (File-->Site Manager) are:
Protocol: SFTP - SSH File Transfer Protocol
Host: <Your host name> (e.g. filezilla.org)
Port: Can usually be left blank and will default to 22 if your port is different obviously change it
Logon Type: Interactive
User: <Your username>

That should allow you to connect. If you have a pin set on the yubikey then you will get a popup request for it, otherwise it will just connect.