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
- xen ssh login: 'stdin: is not a tty'
- Перевірка С-програм під Linux на витоки пам'яті
- Веб-камера Ricoh VGP-VCC5 в linux
- Google Translate API From The Command Line
- Howto install and use usb modem, as example "mts connect", in debian linux
- vsftpd /bin/false check_shell=NO pam hack
- debian + opera
- Wrong charset, conversion from `utf-8' to `windows-1251' is not allowed chroot
- bash history - відображення дати і часу для кожної команди