Autossh monitors a ssh connection and reconnects the ssh-session if the connection fails.
To automatically log in you need to use an authentication key.
The package, slightly outdated, can be found in the 'oldpackages' feed.
Alternative packages:
sshtunnel is a simpler, functionally-identical package. (depends on OpenSSH so higher disk space requirements)
opkg install autossh
dropbearkey -t rsa -f /etc/dropbear/id_rsa
dropbearkey -t rsa -f /root/.ssh/id_dropbear
dropbearkey will print the public key, starting with ssh-rsa.dropbearkey -y -f /etc/dropbear/id_rsa
/tmp/pubkey) dropbearkey -y -f /etc/dropbear/id_rsa | grep ssh-rsa > /tmp/pubkey
authorized_keys file on your server, e.g. copy pubkey file to the server and do cat pubkey >> ~/.ssh/authorized_keys
Autossh is configured using the Unified Configuration Interface (/etc/config/autossh).
To get ssh working you need to replace localhost in 2222:localhost:22 of the ssh variable to the local ip.