Dropbear now supports ed25519


With support for ed25519, Dropbear is now officially my favorite SSH client/server!

Note: ed25519 requires Dropbear version 2022.82 or higher so if you type "dropbearkey" in your terminal and it doesn't list "ed25519" you'll need to replace all references of "ed25519" below with "rsa":


# client:

sudo apt install -y dropbear-bin

mkdir -p ~/.ssh

chmod 700 ~/.ssh

test -f ~/.ssh/id_dropbear || (dropbearkey -t ed25519 -f ~/.ssh/id_dropbear | grep ^ssh-ed25519 > ~/.ssh/id_dropbear.pub)

# ----------------------

# server:

mkdir -p ~/.ssh

chmod 700 ~/.ssh

test -f ~/.ssh/authorized_keys || (touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys)

# copy the contents of the client's id_dropbear.pub into the server's ~/.ssh/authorized_keys

sudo /etc/init.d/ssh stop

sudo apt remove -y openssh-server

sudo apt update

sudo apt install -y dropbear

sudo sed -i 's/DROPBEAR_EXTRA_ARGS=.*/DROPBEAR_EXTRA_ARGS="-s"/' /etc/default/dropbear

(sudo systemctl is-enabled dropbear && sudo systemctl restart dropbear) || (sudo systemctl start dropbear && sudo systemctl enable dropbear)

# ----------------------

# client: test connection to server

dbclient your-server-user@your-server-ip-address


Comments

Popular Posts