我可以使用密码通过 sftp 连接到我的 android 设备。但是我无法使用公钥身份验证进行设置。
$ 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
设置密钥文件和权限:
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
有任何想法吗?