Below is a simple step-by-step guide to setup SSH Server (Dropbear) on your Embedded Linux Target.
- You need to prepare "sftp-server" for Embedded Linux Target, so you need to cross-compile OpenSSH
- Download and unzip OpenSSH source code (for example: openssh-6.0p1.tar.gz)
- In OpenSSH directory create "build" sub-directory
- In the "build" directory create following "build.sh" script (you need to modify path to your cross tools, gcc and strip):
#!/bin/bash
export PATH=/opt/crosstool/gcc-3.4.5-glibc-2.3.6/arm-cirrus-linux-gnu/bin:$PATH
../configure --prefix=$($PWD) CC=arm-linux-gcc --host=arm
make sftp-server
arm-linux-strip -v sftp-server
- Run "build.sh" (don't forget "chmod a+x build.sh")
- "sftp-server" executable will be created, copy it to your Embedded Linux Target and place it to the "/usr/libexec" directory
- Now you need to create SSH key pair on your Development Station (I'm running on Fedora distribution)
- In directory "~/.ssh" execute "ssh-keygen"
- Copy "id_rsa.pub" file to Embedded Linux Target and place it to the "~/.ssh" directory
- On Embedded Linux Target from directory "~/.ssh" execute following command: