Dropbear rsa key problem


#1

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 [email protected]

Finally you sould use this command for scp

scp -S dbclient -i ~/.ssh/id_rsa fileName [email protected]:/dir

#2

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 [email protected]"
        exit 1
fi
dbclient -y -i $RSA_PUB "$1

Usage:
[email protected]:~# connect [email protected]