I made a dropbear multi binary that has android patch. But everytime , when i login via ssh using dropbear as ssh server. On checking environment variables, I get :: HOME=/sdcard PATH=/sbin:/system/sbin:/system/bin:/system/xbin

I found no flag for changing these in dropbear help.

-A Android Mode, specify a user explicitly
-N Android Mode, user name
-C Android Mode, password
-R Android Mode, public key file (authorized_keys)
-U Android Mode, UID
-G Android Mode, GID
-b bannerfile   Display the contents of bannerfile before user login
            (default: none)
-d dsskeyfile   Use dsskeyfile for the dss host key
            (default: /data/data/br.com.bott.droidsshd/files/etc/dropbear_dss_host_key)
-r rsakeyfile   Use rsakeyfile for the rsa host key
            (default: /data/data/br.com.bott.droidsshd/files/etc/dropbear_rsa_host_key)
-F              Don't fork into background
-E              Log to stderr rather than syslog
-w              Disallow root logins
-s              Disable password logins
-g              Disable password logins for root
-p [address:]port
            Listen on specified tcp port (and optionally address),
            up to 10 can be specified
            (default port is 2222 if none specified)
-P PidFile      Create pid file PidFile
            (default /data/data/br.com.bott.droidsshd/files/run/dropbear.pid)
-W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
-K <keepalive>  (0 is never, default 0)
-I <idle_timeout>  (0 is never, default 0)

How can I change default PATH & HOME variables in dropbear ?

1 Answer 1


It is not possible to change the default HOME and PATH variables in Dropbear but you could create a symlink to the directories you want.

You don't mention why you need to change the default variables?

  • Actually, I have installed binaries in many other folders, that I want to include in PATH. Dropbear default HOME points to sdcard, whereas I want to change my HOME directory to folder present in other partition(ext4). I think , It is possible to change both of them, as QuickSSHd app for android has its own PATH and HOME, and it uses dropbear.
    – jonny789
    Commented Jul 13, 2015 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .