From da5984fd7dd06d2961b8b56083fd30e98a720326 Mon Sep 17 00:00:00 2001 From: Bevan Stanely <60595515+bevsxyz@users.noreply.github.com> Date: Sat, 14 May 2022 01:27:44 +0530 Subject: [PATCH 1/4] improve: README for Github Compatibility --- README | 77 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/README b/README index d197ec787..d09c75a81 100644 --- a/README +++ b/README @@ -1,79 +1,84 @@ -This is Dropbear, a smallish SSH server and client. -https://matt.ucc.asn.au/dropbear/dropbear.html +# [Dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html), a smallish SSH server and client. -INSTALL has compilation instructions. +[INSTALL](INSTALL)as compilation instructions. -MULTI has instructions on making a multi-purpose binary (ie a single binary +[MULTI](MULTI) has instructions on making a multi-purpose binary (ie a single binary which performs multiple tasks, to save disk space) -SMALL has some tips on creating small binaries. +[SMALL](SMALL) has some tips on creating small binaries. -Please contact me if you have any questions/bugs found/features/ideas/comments etc :) -There is also a mailing list http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/dropbear - -Matt Johnston -matt@ucc.asn.au +## Generic Notes -In the absence of detailed documentation, some notes follow: -============================================================================ +### Server public key auth: -Server public key auth: - -You can use ~/.ssh/authorized_keys in the same way as with OpenSSH, just put +You can use `~/.ssh/authorized_keys` in the same way as with OpenSSH, just put the key entries in that file. They should be of the form: +```bash ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwVa6M6cGVmUcLl2cFzkxEoJd06Ub4bVDsYrWvXhvUV+ZAM9uGuewZBDoAqNKJxoIn0Hyd0Nk/yU99UVv6NWV/5YSHtnf35LKds56j7cuzoQpFIdjNwdxAN0PCET/MG8qyskG/2IE2DPNIaJ3Wy+Ws4IZEgdJgPlTYUBWWtCWOGc= someone@hostname +``` -You must make sure that ~/.ssh, and the key file, are only writable by the +You must make sure that `~/.ssh`, and the key file, are only writable by the user. Beware of editors that split the key into multiple lines. -Dropbear supports some options for authorized_keys entries, see the manpage. - -============================================================================ +Dropbear supports some options for `authorized_keys` entries, see the manpage. -Client public key auth: +### Client public key auth: Dropbear can do public key auth as a client, but you will have to convert -OpenSSH style keys to Dropbear format, or use dropbearkey to create them. +OpenSSH style keys to Dropbear format, or use `dropbearkey` to create them. -If you have an OpenSSH-style private key ~/.ssh/id_rsa, you need to do: +#### Generating Private Keys +If you have an OpenSSH-style private key `~/.ssh/id_rsa`, you need to do: + +```bash dropbearconvert openssh dropbear ~/.ssh/id_rsa ~/.ssh/id_rsa.db dbclient -i ~/.ssh/id_rsa.db +``` Dropbear does not support encrypted hostkeys though can connect to ssh-agent. -============================================================================ - If you want to get the public-key portion of a Dropbear private key, look at -dropbearkey's '-y' option. +dropbearkey's `-y` option. -============================================================================ +#### Generating Server Keys To run the server, you need to generate server keys, this is one-off: + +```bash ./dropbearkey -t rsa -f dropbear_rsa_host_key ./dropbearkey -t dss -f dropbear_dss_host_key ./dropbearkey -t ecdsa -f dropbear_ecdsa_host_key ./dropbearkey -t ed25519 -f dropbear_ed25519_host_key +``` or alternatively convert OpenSSH keys to Dropbear: + +```bash ./dropbearconvert openssh dropbear /etc/ssh/ssh_host_dsa_key dropbear_dss_host_key +``` You can also get Dropbear to create keys when the first connection is made - this is preferable to generating keys when the system boots. Make sure -/etc/dropbear/ exists and then pass '-R' to the dropbear server. +`/etc/dropbear/` exists and then pass `-R` to the dropbear server. -============================================================================ +## Miscellaneous -If the server is run as non-root, you most likely won't be able to allocate a -pty, and you cannot login as any user other than that running the daemon +- If the server is run as non-root, you most likely won't be able to allocate a +`pty`, and you cannot login as any user other than that running the daemon (obviously). Shadow passwords will also be unusable as non-root. +- The Dropbear distribution includes a standalone version of OpenSSH's `scp` +program. You can compile it with `make scp`, you may want to change the path +of the ssh binary, specified by `_PATH_SSH_PROGRAM` in `options.h` . By default +the progress meter isn't compiled in to save space, you can enable it by +adding `SCPPROGRESS=1` to the make commandline. -============================================================================ +## Contact -The Dropbear distribution includes a standalone version of OpenSSH's scp -program. You can compile it with "make scp", you may want to change the path -of the ssh binary, specified by _PATH_SSH_PROGRAM in options.h . By default -the progress meter isn't compiled in to save space, you can enable it by -adding 'SCPPROGRESS=1' to the make commandline. +Please contact me if you have any questions/bugs found/features/ideas/comments etc :) +There is also a mailing list http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/dropbear + +Matt Johnston +matt@ucc.asn.au From 2badcf130acbea2d4feeb2f43ae4cb4836df2ffe Mon Sep 17 00:00:00 2001 From: Bevan Stanely <60595515+bevsxyz@users.noreply.github.com> Date: Sat, 14 May 2022 01:28:54 +0530 Subject: [PATCH 2/4] Rename README to README.md --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From ee8d8d0ab3ecf1120056dbbbff445ca668b736a1 Mon Sep 17 00:00:00 2001 From: Bevan Stanely <60595515+bevsxyz@users.noreply.github.com> Date: Sat, 14 May 2022 01:37:56 +0530 Subject: [PATCH 3/4] fix: grammar --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d09c75a81..dfb3744e6 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # [Dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html), a smallish SSH server and client. -[INSTALL](INSTALL)as compilation instructions. +[INSTALL](INSTALL) has compilation instructions. -[MULTI](MULTI) has instructions on making a multi-purpose binary (ie a single binary -which performs multiple tasks, to save disk space) +[MULTI](MULTI) has instructions on making a multi-purpose binary (i.e., a single binary +which performs multiple tasks to save disk space) [SMALL](SMALL) has some tips on creating small binaries. @@ -19,10 +19,10 @@ the key entries in that file. They should be of the form: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwVa6M6cGVmUcLl2cFzkxEoJd06Ub4bVDsYrWvXhvUV+ZAM9uGuewZBDoAqNKJxoIn0Hyd0Nk/yU99UVv6NWV/5YSHtnf35LKds56j7cuzoQpFIdjNwdxAN0PCET/MG8qyskG/2IE2DPNIaJ3Wy+Ws4IZEgdJgPlTYUBWWtCWOGc= someone@hostname ``` -You must make sure that `~/.ssh`, and the key file, are only writable by the +You must make sure that `~/.ssh` and the key file are only writable by the user. Beware of editors that split the key into multiple lines. -Dropbear supports some options for `authorized_keys` entries, see the manpage. +Dropbear supports some options for `authorized_keys` entries; see the manpage. ### Client public key auth: @@ -38,7 +38,7 @@ dropbearconvert openssh dropbear ~/.ssh/id_rsa ~/.ssh/id_rsa.db dbclient -i ~/.ssh/id_rsa.db ``` -Dropbear does not support encrypted hostkeys though can connect to ssh-agent. +Dropbear does not support encrypted hostkeys though it can connect to ssh-agent. If you want to get the public-key portion of a Dropbear private key, look at dropbearkey's `-y` option. @@ -60,8 +60,8 @@ or alternatively convert OpenSSH keys to Dropbear: ./dropbearconvert openssh dropbear /etc/ssh/ssh_host_dsa_key dropbear_dss_host_key ``` -You can also get Dropbear to create keys when the first connection is made - -this is preferable to generating keys when the system boots. Make sure +You can also get Dropbear to create keys when the first connection is made, +which is preferable to generating keys when the system boots. Make sure `/etc/dropbear/` exists and then pass `-R` to the dropbear server. ## Miscellaneous @@ -70,9 +70,9 @@ this is preferable to generating keys when the system boots. Make sure `pty`, and you cannot login as any user other than that running the daemon (obviously). Shadow passwords will also be unusable as non-root. - The Dropbear distribution includes a standalone version of OpenSSH's `scp` -program. You can compile it with `make scp`, you may want to change the path -of the ssh binary, specified by `_PATH_SSH_PROGRAM` in `options.h` . By default -the progress meter isn't compiled in to save space, you can enable it by +program. You can compile it with `make scp`; you may want to change the path +of the ssh binary, specified by `_PATH_SSH_PROGRAM` in `options.h`. By default, +the progress meter isn't compiled to save space. You can enable it by adding `SCPPROGRESS=1` to the make commandline. ## Contact From be43181a23c7366d788e8ad8c14dc4e65e817d3c Mon Sep 17 00:00:00 2001 From: Bevan Stanely <60595515+bevsxyz@users.noreply.github.com> Date: Wed, 18 May 2022 23:38:24 +0530 Subject: [PATCH 4/4] add: Latest version badge with shields.io --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dfb3744e6..d2d4e0e37 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # [Dropbear](https://matt.ucc.asn.au/dropbear/dropbear.html), a smallish SSH server and client. +[![Version](https://img.shields.io/badge/dynamic/json?color=blue&label=Version&query=%24%5B%27name%27%5D&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fmkj%2Fdropbear%2Freleases%2Flatest)](https://github.com/mkj/dropbear/releases/latest) + [INSTALL](INSTALL) has compilation instructions. [MULTI](MULTI) has instructions on making a multi-purpose binary (i.e., a single binary