0

I'm having an OpenWRT router, from which I have to automatically create a SSH connection to a remote host. But the remote host doesn't support public key authentication, so I thought I can create my own askpass script and specify it using the SSH_ASKPASS environment variable. Unfortunately this variable is not respected/read by the dropbear ssh client, contained in OpenWRT.

Is there any way of specifying a askpass program/script for the dropbear ssh client?

[edit:] I've just realized, that last time I did the whole thing, I've just installed the openssh-client, which doesn't work this time, since the router has only 332 kb left :-(

white_gecko
  • 4,808
  • 4
  • 55
  • 76

1 Answers1

2

Usually the Dropbear SSH client (dbclient) allows you to specify the password through an environment variable. https://www.dd-wrt.com/wiki/index.php/SSH#Automatic_Login_.28for_shell_scripts.29

DROPBEAR_PASSWORD='password' ssh -y username@remote.host

But this default-option was disabled on 18 Apr 2015 in openwrt/LEDE/dd-wrt/

https://github.com/mirror/dd-wrt/commit/067ea1a1efe5621631dde6fdaf2f8ee95b02048e#diff-851da486b641491d761c0295dbe45035

https://github.com/lede-project/source/commit/af4d04ed36bd313fe817f38c2baf143059fb93d9#diff-9a10152ace5c9c746def208fa7f28dca

I removed the DROPBEAR_PASSWORD changes from patch and rebuilt the dropbear package for LEDE for my router. If there is little space left at your router opkg may not work to install the rebuilt package. Then you have to rebuild the whole firmware.

guest
  • 21
  • 2