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
- Перевірка С-програм під Linux на витоки пам'яті
- Linux Tuning Parameters
- Howto install decklink driver of blackmagicdesign on gentoo linux
- etc snapshots with git
- Linux Commands For Shared Library Management and Debugging Problem
- How To capture video from tv-tuner card via mencoder
- How To Integrate ClamAV Into PureFTPd For Virus Scanning On Debian
- Upgrade postgresql-8.3 to postgresql-9.0
- Howto install and use usb modem, as example "mts connect", in debian linux