You are not logged in.

#1 2020-12-07 00:40:20

kormpu
Member
Registered: 2020-08-18
Posts: 30

Unable to connect using sftp via pubkey

For some reason, I get PAM authentication failures when using my pubkey when trying to connect via sftp. But enabling password authentication and just directly using my password, there are no problems connecting. At this point i feel like it could be the app connecting improperly or doing something to my keyfile. (the app is Documents by readdle)

Log for auth failure: https://pastebin.com/rACjMyGe

Offline

#2 2020-12-07 08:03:41

seth
Member
Registered: 2012-09-03
Posts: 60,960

Re: Unable to connect using sftp via pubkey

Can you connect the server w/ "sftp" (the client doesn't seem to send a public key at all)
If that fails as well, did you read https://wiki.archlinux.org/index.php/SS … ote_server ?

Offline

#3 2020-12-07 09:25:14

kormpu
Member
Registered: 2020-08-18
Posts: 30

Re: Unable to connect using sftp via pubkey

That's part of the problem. It is hard for me to tell what is happening on the client-side because it is an ios application. As far as I know, the key should work as it works when I use it on my laptop.

Offline

#4 2020-12-07 09:48:07

progandy
Member
Registered: 2012-05-17
Posts: 5,279

Re: Unable to connect using sftp via pubkey

Have you tried disabling password auth in the ssh server config so key based auth is the only supported method? Maybe the app is not intelligent enough to choose the correct method if multiple are available.

Last edited by progandy (2020-12-07 09:51:09)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2020-12-07 15:21:56

kormpu
Member
Registered: 2020-08-18
Posts: 30

Re: Unable to connect using sftp via pubkey

I have before, but for the sake of documenting the problem I just recently tried it again.

log: https://pastebin.com/L0bhWkRZ

Based on this line, it looks like the app is still going forward with using password auth instead of using the key, despite it saying that password auth is disabled in favor of using the key.

Dec 07 09:18:55 servPc sshd[1301144]: debug1: userauth-request for user papu service ssh-connection method password 

Last edited by kormpu (2020-12-07 15:23:56)

Offline

#6 2020-12-07 15:59:53

seth
Member
Registered: 2012-09-03
Posts: 60,960

Re: Unable to connect using sftp via pubkey

This here?
https://apphelp.readdle.com/pdfexpert6/ … ge&id=1139

Have you tried to empty the login/password fields?
Did you select the proper *private* key file?

Offline

#7 2020-12-08 03:52:17

kormpu
Member
Registered: 2020-08-18
Posts: 30

Re: Unable to connect using sftp via pubkey

I have emptied the password field every time. The only thing i can figure is that the key is being mangled in transit to my phone. What would be the best way to transfer it to my phone? (it's an ios device)

Offline

#8 2020-12-08 14:39:49

seth
Member
Registered: 2012-09-03
Posts: 60,960

Re: Unable to connect using sftp via pubkey

You're probably better off asking on an iOS forum (or the app support directly) but the server log doesn't indicate an unknown key to have been tried.
Maybe iOS allows to calculate hashes (md5, sha*sum) of files that you could run on the key and compare it w/ the original to see whether iTunes screwed the transfer?

Offline

#9 2020-12-08 22:31:46

kormpu
Member
Registered: 2020-08-18
Posts: 30

Re: Unable to connect using sftp via pubkey

Checking its hash is a good idea, I'll definitely check that later.

Offline

Board footer

Powered by FluxBB