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
- Nginx: Too Many Open Files Error
- How To quick generate openssl certificate signing request
- Howto install Postfix and SASL (Debian, Ubuntu)
- debian встановлення adobe flash player 10 64bit iceweasel (firefox)
- vsftpd /bin/false check_shell=NO pam hack
- Google Translate API From The Command Line
- How To capture video from tv-tuner card via mencoder
- Howto install decklink driver of blackmagicdesign on gentoo linux
- Synaptics Touchpad в Linux