0

I can sftp to my android device using password. However i can not set up this using public key auth.

$ ssh -vvv [email protected]
SSHD Server
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/jsaak/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password

Set the key file, and permissions too:

root@android:/data/data/web.oss.sshsftpDaemon # ls -ald .ssh
drwx------ root     root              2016-04-04 12:08 .ssh
root@android:/data/data/web.oss.sshsftpDaemon # ls -al .ssh                                                                                                                                                                                                                     
-rw------- root     root          394 2016-04-04 11:45 authorized_keys

Any ideas?

3
  • Are you sure that /data/data/web.oss.sshsftpDaemon/.ssh/authorized_keys is the file checked when logging in as root?
    – michas
    Commented Apr 4, 2016 at 13:05
  • Is /data/data/web.oss.sshsftpDaemon home directory of a root user? Do you have specific configuration in sshd_config?
    – Jakuje
    Commented Apr 4, 2016 at 13:07
  • I am not sure if the file is checked at all, i do not know how to look. Home of the root user is not this directory, it was not working from there either. The reason i moved it, was that in this direcotry i could set strict permissions, i was hoping that it fixes the error, but it did not help.
    – jsaak
    Commented Apr 5, 2016 at 16:37

0

You must log in to answer this question.

Browse other questions tagged .