Dropbear rsa key problem

Using public key authentication with dropbear ssh client is a little different from regular openssh clients.

Dropbear doesn’t lookup users .ssh directory for user’s private key. You should expicitly say which private key will be used for session with the -i parameter. Whole process described below:

First of all, you sould create a rsa key with dropbearkey in ~/.ssh directory

dropbearkey -t rsa -f id_rsa

This command generate a public key, you sould copy and paste it to other PC’s in authorized_keys file.
(you souldn’t paste Fingerprint line, only key line)

Try, connect to PC this commad:

dbclient -y -i ~/.ssh/id_rsa user@ip

Finally you sould use this command for scp

scp -S dbclient -i ~/.ssh/id_rsa fileName user@ip:/dir

ln -s /path/script/connect.sh /usr/bin/connect

#!/bin/ash
scriptname=\`basename $0\`
RSA_PUB=/root/.ssh/id_rsa
if [ "$1" = "" ]; then
        echo "Usage: $scriptname username@host"
        exit 1
fi
dbclient -y -i $RSA_PUB "$1

Usage:
root@OpenWrt:~# connect [email protected]