Jonmhaney / android-x86

Automatically exported from code.google.com/p/android-x86
0 stars 0 forks source link

On Android-x86, the password free login could not be configured #168

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

The requirement is to enable the password free ssh login  between two 
Android-x86 machines.

What steps will reproduce the problem?
On android machine 1 & 2:
1.Remount the root file system as below:
busybox mount -t tmpfs -o remount -o rw nodev /
2.mkdir /data/dropbear
3.mkdir /data/dropbear/.ssh
4.mkdir /usr/bin
5.cp dropbear dropbearkey dropbearconvert scp /usr/bin/
6.cd /data/dropbear
7.dropbearkey -t rsa -f dropbear_rsa_host_key
8.dropbearkey -t dss -f dropbear_dss_host_key
9.dropbearkey -t rsa -f id_rsa
9.dropbearkey -f ./id_rsa -y > id_rsa.pub

Copy id_rsa.pub to Android machine 2 by using a pen drive as below and Append 
this key to /data/dropbear/authorized_keys.
----------------------------------
Mounting a Pen drive on Android machine 1:
$ busybox mount /dev/block/sdb /data/tmp
$ cp id_rsa.pub /data/tmp

Mounting a Pen drive on Android machine 2 and append the public key to file
authorized_keys:
$ busybox mount /dev/block/sdb /data/tmp
$ cat /data/tmp/id_rsa.pub > /data/dropbear/.ssh/authorized_keys
----------------------------------
10. cat id_rsa.pub > /data/dropbear/.ssh/authorized_keys
11. chmod 0700 /data/dropbear
12. echo "export PATH=/sbin:/system/sbin:/usr/bin:/system/bin:/system/xbin" >> 
data/dropbear/.profile

Start Dropbear on both android machines as below:

1. dropbear -A -N root -U 0 -G 0 -C root123 -r /data/dropbear/ 
dropbear_rsa_host_key -p 127.0.0.1:22
2. dropbear -A -N root -U 0 -G 0 -C nothing -R /data/dropbear/id_rsa.pub -r 
<rsa.secret> -p <MySshPort> -s

What is the expected output? What do you see instead?
When tried to login from Android_machine-1 to Android_machine-2,
the following error is observed.
$ ssh root@AndroidMachine2
$ Permission denied(public key).

What version of the product are you using? On what operating system?
eclair-x86
Based on Android 2.1 release (Eclair).

Please provide any additional information below.
Environment for Build and Install of Android-x86
Android-x86 OS image build
    Test machine : DELL T1500 precision desktop
    OS used        : ubuntu-10.04

Android-x86 OS installation
    Test machine : DELL Optiplex 780 dual core desktop

Original issue reported on code.google.com by vishal...@gmail.com on 6 Dec 2010 at 11:30

GoogleCodeExporter commented 9 years ago
Additional information:

Dropbear-0.52+ Patch( http://pastebin.com/e1RawQd5 )
is used for ssh Client and Server on Android-x86.

Original comment by vishal...@gmail.com on 6 Dec 2010 at 11:33

GoogleCodeExporter commented 9 years ago

Original comment by al@alsutton.com on 10 Dec 2010 at 8:10