SSH Access on E2/A910/...
:
How-to have access to the phone's linux command line from your computer.
STEP BY STEP Need some practice to install, very easy to use :
Please read carefully, if your linux knowledge is 'new' (few
), as maybe you'll study making errors, and solving them by re-read and understanding...
Note that there is a Bragon's version of sshd for almost every ezx phones,
, and you can just adapt some few details to suit your device and use this tuto on A1200, E6, E2.
(1) Prepare your computer (client):
In this step we will copy your ssh public key and the necessary mpkgs on the SD card.
(2) On phone (the server):
- Install Ezxterm and sshd, just click on the mpkg's files then wait.
I will use SD card when asked, for installing them.
Don't launch anything yet (either sshd and exzterm) we aren't ready, we need a few changes on some SD card's file.
- Switch you phone off, and remove the battery and copy the phone's IMEI number.
(3) Back to the PC:
In order to make your installations persitants, and to give the necessary rights to ezxterm.
- Read your SD card, then open the file ".system/java/CardRegistry" (should be hidden by default on linux)
You'll find some strings related to EZxterm, analyse the file's separators.
(for example [0c816b70-ac6f-55c2-856e-e58213129e65] is the sign that a new section (software setting) is beggining)
- For Ezxterm, you'll need to add:
IMEI = *************** (your IMEI)
and change :
GroupID = ezx to GroupID = root
UserID = root
- For sshd, you'll need to add:
IMEI = **************** (your IMEI)
(4) Then you can NOW copy your host client's public keys:
2 choices:
- -You use samba: copy authorized_keys (see (1) ) to both /ezxlocal/home/root/.ssh/ and /ezxlocal/home/ezx/.ssh/.
- -you use ezxterm:
=> You can type these lines or make a script:
Code:
# cp /mmc/mmca1/authorized_keys /ezxlocal/home/root/.ssh/
# cp /mmc/mmca1/authorized_keys /ezxlocal/home/ezx/.ssh/
(5) Setting up the Network.
- Switch the phone into USB Modem mode, first, to tell the modem to turn on USBNet, with a magic AT command.
AT+MODE=13On A910 :
Menu>Settings>Phone settings>connectivity>USB settings
or maybe: Menu>Connectivity>USB settings
search for USBNet or Modem.
- If you have USBNet, select it. Try to ping the phone : Phone's IP address should be 192.168.1.2 or 192.168.16.2. Then setup computer side accordingly, with your regular network configuration tools.
You can jump to step (6) if pinging the phone's IP is succesfull.
- If you only see Modem mode avalaible, you must refer to Get a shell - OpenEZX sections "Change Modem Mode", and "Configuring the USB Network device", at least.
Most of linux distros come with zaurus module installed, need only "#echo "AT+mode=13" > /dev/ttyACM0", but read that wiki page if you still can't ping the phone...
Windows user have to download the drivers if the device isn't recognized after you change the mode to USBNet(download here some versions of thoses drivers in one zip file, thanks to Dellsonic, driver also lives at motodev.com official site), then use hyperterminal, maybe putty can do that, too.
(6)Now this become more fun!!
After connection is done USB network is ready to be used for ssh.
Just make sure no firewall blocks the port 22 of course (at least for USB network).
- Start sshd with its icon.
- Wait some minuts for the first time (for folders generation, key generation...).
(The only way I found to check if sshd is running or not is to scan the phone's ports to see if SSH (port 22) was opened or not...you can use nmap on linux)
(7) Now ssh should be configured and running.

Use "#ssh 192.168.1.2" as root or the equivalent for putty on windows. Make sure phone's IP is this one or change it according to what "ifconfig" command shows (best is to check ifconfig on the phone).
The prompt now asks for a certificate acceptation (yes/no) , write "yes" of course, then you're in.
If the prompt now show you a login and asks for a root password, then you probably made a mistake before, when writing or creating the keys. You should retry, ensure you are root or sudoing, and your ssh public key is in openssh format.
Once you closed connection, you'll each time need to repeat from step (5)
D O N E !!
Requirement (or jump to attachments
):
sshd_rokr2e.mpkg (I used this one http://www.motorolafans.com/forums/r..._0-rokre2.html)
Either smbd or ezxterm.mpkg (I used this one Motorola ROKR E2 Modders - EzxTerm 16.1.2008 ) and the SDcard. Note that as i can't find an mpkg installer for Samba, I only described the ezxterm method.
On host: ssh, putty or some other ssh clients.
Maybe a910i already have a samba installed, so that should be easier on it.
Troubleshootings:
Well, don't you think it's hard enought, to consider the whole task as a big trouble ? 
Suggestions:
Maybe after all this done, you'll want to change the ezxterm's access from root to ezx user, just revert the relateds changes on SD's CardRegistry file.
For USB based networking, best is to change the MTU to 750 on both side of the ssh link, you'll probably need to do that each time you use it, unfortunately...not sure of that, it could also be persistant.
If you don't like the way ssh work, you can consider using the E2 version for Inetd (see : Motorola ROKR E2 Modders - InetD daemon ), it's said to be easier to use it, but i believe it's not true...
OK, now, if you need help, you can ask there, i tried to explain every steps and their meanings, but please tell me if i missed something.