bobrofon / easysshfs

SSHFS for Android
MIT License
106 stars 16 forks source link

Public key auth? #6

Closed Krutonium closed 6 years ago

cantenna commented 6 years ago

What a strange way to raise an issue... Anyways,

Per you write up on Google Play; ̶P̶a̶s̶s̶w̶o̶r̶d̶ ̶a̶u̶t̶h̶e̶n̶t̶i̶c̶a̶t̶i̶o̶n̶ ̶o̶n̶l̶y̶.̶ For using public key authentication add "IdentityFile=" to sshfs options. Rooted device required (/dev/fuse in android is not allow for users except root).

Does this feature indeed work? I have tried the following and have been unsuccessful ;

Test 1 IdentityFile=/.ssh/id_rsa

Test 2 IdentityFile=/data/.ssh/id_rsa

Test 3 IdentityFile=/storage/emulated/0/.ssh/id_rsa

Test 4 IdentityFile=/root/.ssh/id_rsa

....and router reports; Mon Jul 23 07:33:10 2018 auth.info sshd[5313]: Connection closed by authenticating user cloud 192.168.123.22 port 39608 [preauth]

I have also ensured that permissions are indeed correct as well...

chown -R root /root/.ssh/id_rsa chown -R root /root/.ssh/ chmod 700 /root/.ssh/ chmod 600 /root/.ssh/authorized_keys

I have no issues at all connecting to the same server via sshfs for Arch on my Surface Pro 4.

bobrofon commented 6 years ago

Well. It seems like some time ago I start to build ssh without openssl dependency. And it breaks pubkey auth at all. If you need a hotfix you can reuse one of old ssh builds. https://github.com/bobrofon/easysshfs/blob/329eb46ac562c3c56b8ab42221034efac2cf2ce5/app/src/main/assets/ssh

cantenna commented 6 years ago

Thank you for the response and advice. Will try and report back.

Think you might undo to add key support in the future?

Also just wanted to say how greatful we all are for you maintaining this. sshfs is extraordinarily useful to have an android!

Krutonium commented 6 years ago

Wow shit, I must have been tired when I opened this. Thanks for the good (if late) response though! :+1: