# Dropbear rsa key problem

**URL:** <https://linux-tips.com/t/dropbear-rsa-key-problem/196>\
**Category:** Network\
**Created:** [July 24, 2008, 7:35am UTC](https://linux-tips.com/t/dropbear-rsa-key-problem/196 "2008-07-24T07:35:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erdem](https://linux-tips.com/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@erdem](https://linux-tips.com/u/erdem)\
**Post date:** [July 24, 2008, 7:35am UTC](https://linux-tips.com/t/dropbear-rsa-key-problem/196/1 "2008-07-24T07:35:22Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![butaford](https://linux-tips.com/letter_avatar_proxy/v4/letter/b/65b543/32.png) [@butaford](https://linux-tips.com/u/butaford)\
**Post date:** [August 2, 2017, 7:14am UTC](https://linux-tips.com/t/dropbear-rsa-key-problem/196/2 "2017-08-02T07:14:10Z")

</div>

`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 root@192.168.1.2`
