ssh daemon on Android with dropbear
The following procedures have been tested on my Motorola milestone with CyanogenMod v7.
We will use RSA key authentication only.
Dropbear is installed on CyanogenMod by default.
If it is not present, you can download and install it manually
http://matt.ucc.asn.au/dropbear/
Copy your private rsa-key to /sdcard/
cp ~/.ssh/id_rsa.pub /sdcard/authorized_keys
Open terminal on your phone and do it:
su
mkdir /data/dropbear
mkdir /data/dropbear/.ssh
mv /sdcard/authorized_keys /data/dropbear/.ssh/
chown root:root /data/dropbear/.ssh/authorized_keys
dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key
dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key
chmod 755 /data/dropbear
chmod 644 /data/dropbear/dropbear*host_key
chmod 755 /data/dropbear/.ssh
chmod 600 /data/dropbear/.ssh/authorized_keys
Now make it auto start when your phone boots.
Remount /system partition
mount -o remount,rw `mount |grep system | awk {'print $1'}` /system
Create /system/etc/init.d/30sshd with the following contents, and make it executable:
#!/system/bin/sh
dropbear -s -g
You can start dropbear manually or restart your phone.
Читайте також:
- SDR receiver based on Android MK808B and DVB-T tuner
- Wrong charset, conversion from `utf-8' to `windows-1251' is not allowed chroot
- debian встановлення adobe flash player 10 64bit iceweasel (firefox)
- How To capture video from tv-tuner card via mencoder
- Запуск декількох X сесій
- Пошук великих файлів, find, ls, du
- xen ssh login: 'stdin: is not a tty'
- Upgrade postgresql-8.3 to postgresql-9.0
- Linux Commands For Shared Library Management and Debugging Problem
- Google Translate API From The Command Line