net/dropbear/readme
$ cat readme
dropbear
--------
dropbear is a small ssh server and client. it is the only ssh available for derive. 
it provides most functionality you  will need, and is much smaller than alternatives
like openssh.

installation
------------
to install dropbear with dtr, run 'dtr mi dropbear'.

provides
--------
- 'dropbear'             an ssh server
- 'dbclient'             an ssh client
- 'dropbearkey'          an ssh private key generator
- 'dropbearconvert'      a tool to convert between dropbear and openssh key formats

usage
-----
a manpage is provided for each of the commands listed in the above 'provides' section.
 you will need to install the 'mandoc' port to view them.

setting up git
--------------
one common use of ssh is for git authentication. this can be done with dropbear. 
first, generate a key. i will use rsa for this example, but others, such as 
ed25519, are also available.

	mkdir ~/.ssh
	dropbearkey -t rsa -f ~/.ssh/id_rsa

this will create the id_rsa file in ~/.ssh; you will need to get the public key
and input it into the git forge  of your choice, somewhere in the settings/security 
page, probably. to get the public key, run the following (you only need to copy the
bit starting ssh-rsa, not the fingerprint part.)

	dropbearkey -y -f ~/.ssh/id_rsa

if you want to use a key you already have, you can use dropbearconvert to convert
it from openssh's format to dropbear's format: 
	
	dropbearconvert openssh dropbear ~/files/id_openssh ~/.ssh/id_rsa

once you've done that, you will need to create a script somewhere for git to use
as it's ssh command, say '~/bin/dropbear.sh'; it should look like this:

	#!/bin/sh
	dbclient -i ~/.ssh/id_rsa $*

then, to make the script executable and make git use it as the ssh command:

	chmod +x ~/bin/dropbear.sh
	export GIT_SSH=~/bin/dropbear.sh

you can then test it works by attempting to connect to the git forge of your 
choice, i will use codeberg as an example here:

	dbclient -i ~/.ssh/id_rsa git@codeberg.org

if that works, you should be able to use git with ssh authentication.