Device: LENOVO IdeaTabA2109A
Android Version: 4.1.1
Build: JRO03R.A2109A_03_13_121126_MCL0201
I tried to setup authorized_keys to connect to the ssh-server on my IdeaTab A2109A following [Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
Unfortunately adb-commands did not work for me, could depend on my knowledge, but I think adb is not needed. Connection via ssh to the tablet should be an alternative.
I connected from my Ubuntu 12.04 via ssh to the ssh-server of the tablet ( https://play.google.com/store/apps/details?id=me.shkschneider.dropbearserver )
[Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
No idea, why he does "cd /", but I did it. Then mkdir didn't work, so I did
[/QUOTE]
mkdir -p /data/dropbear/.ssh[/QUOTE]
And maybe this is the problem, why key-identification didn't work at the end. Maybe the authorized_keys are expected at another place.
[Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
dropbearkey was not found, so there is a path problem. I have installed https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside and postinstalled System v1.95. Using the shell at the tablet, "which dropbearkey" told me, that it is found at "/data/data/com.spartacusrex.spartacuside/files/system/bin/dropbearkey"
So I did this to create the server keys:
[Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
Instead of using adb, I used vi and the clipboard to copy the key of my pc to /data/.ssh/authorized_keys
I stopped the ssh-server and started it again and then I tried to login to the tablet via ssh from my pc and was asked for the password. So what is wrong?
It would be interesting what is configured in sshd_config, but the query rans for a very long time now and showed no result.
My local pc:
Android Version: 4.1.1
Build: JRO03R.A2109A_03_13_121126_MCL0201
I tried to setup authorized_keys to connect to the ssh-server on my IdeaTab A2109A following [Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
Unfortunately adb-commands did not work for me, could depend on my knowledge, but I think adb is not needed. Connection via ssh to the tablet should be an alternative.
I connected from my Ubuntu 12.04 via ssh to the ssh-server of the tablet ( https://play.google.com/store/apps/details?id=me.shkschneider.dropbearserver )
[Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
cd /
mkdir /data/dropbear/.ssh
ln -s /data/dropbear/.ssh /data/.ssh
No idea, why he does "cd /", but I did it. Then mkdir didn't work, so I did
[/QUOTE]
mkdir -p /data/dropbear/.ssh[/QUOTE]
And maybe this is the problem, why key-identification didn't work at the end. Maybe the authorized_keys are expected at another place.
[Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key
dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key
dropbearkey was not found, so there is a path problem. I have installed https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside and postinstalled System v1.95. Using the shell at the tablet, "which dropbearkey" told me, that it is found at "/data/data/com.spartacusrex.spartacuside/files/system/bin/dropbearkey"
So I did this to create the server keys:
/data/data/com.spartacusrex.spartacuside/files/system/bin/dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key
/data/data/com.spartacusrex.spartacuside/files/system/bin/dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key
[Tutorial] Getting a SSH client and server working on CyanogenMod | TK Assembled
chmod 755 /data/dropbear /data/dropbear/.ssh /data/.ssh
chmod 644 /data/dropbear/dropbear_*_host_key
/data/data/com.spartacusrex.spartacuside/files/system/bin/dropbearkey -t rsa -f /data/.ssh/id_rsa
/data/data/com.spartacusrex.spartacuside/files/system/bin/dropbearkey -y -f /data/.ssh/id_rsa | grep "^ssh-rsa" > /data/.ssh/id_rsa.pub
cat /data/.ssh/id_rsa.pub > /data/.ssh/authorized_keys
chmod 600 /data/.ssh/authorized_keys
Instead of using adb, I used vi and the clipboard to copy the key of my pc to /data/.ssh/authorized_keys
chmod 600 /data/.ssh/authorized_keys
I stopped the ssh-server and started it again and then I tried to login to the tablet via ssh from my pc and was asked for the password. So what is wrong?
ls -la /data/.ssh/
-rw------- root root 618 2013-01-06 15:09 authorized_keys
-rw------- root root 426 2013-01-06 15:03 id_rsa
-rw------- root root 228 2013-01-06 15:04 id_rsa.pub
ls -la /data/ssh/
drwx------ root root 2012-12-27 22:23 empty
It would be interesting what is configured in sshd_config, but the query rans for a very long time now and showed no result.
root@android:/ # find / -name sshd_config
My local pc:
~# grep authorized_keys /etc/ssh/sshd_config
#AuthorizedKeysFile %h/.ssh/authorized_keys
Last edited: