Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Public key for authentication could not be read" message on server's start #301

Open
liinahamari opened this issue May 5, 2023 · 5 comments

Comments

@liinahamari
Copy link

liinahamari commented May 5, 2023

I receive toast "Public key for authentication could not be read" message on server's start every time. All files access permission been granted as desribed.
From logs file:

starting ftp server
trying authorized keys file /storage/emulated/0/Android/data/org.primftpd/files/.ssh/authorized_keys
could not read key at line 2: java.lang.IllegalArgumentException, bad base-64
could not read key at line 6: java.lang.IllegalArgumentException, bad base-64
trying authorized keys file /storage/emulated/0/.ssh/authorized_keys
Intializing shared thread pool executor with max threads of 10
could not read keys FileNotFoundException, /storage/emulated/0/.ssh/authorized_keys: open failed:...
trying authorized keys file /storage/emulated/0/.ssh/authorized_key.pub
could not read keys FileNotFoundException, /storage/emulated/0/.ssh/authorized_key.pub: open fail...
FTP server started

@wolpi
Copy link
Owner

wolpi commented May 7, 2023

That means you don't have a valid key in your file. Can you post file content here?

@liinahamari
Copy link
Author

liinahamari commented May 10, 2023

# sample authorized keys file
# place your keys in this file
# one key per line
# of course without leading #
# e.g.
# sh-ed25519 AAAAC3NzaC1lZDI1N....
# ssh-rsa AAAAB3NzaC1yc2EAAAAD...

@wolpi
Copy link
Owner

wolpi commented May 13, 2023

That is the automatically generated sample file. Of course it does not contain a valid key. You have to place your key in that file.

@liinahamari
Copy link
Author

Is there's an API which helps to do so?

@wolpi
Copy link
Owner

wolpi commented May 28, 2023

I don't really understand that question.
Placing a key in a textfile is a common configuration task. If you want to do that programmatically you can just use file APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants