1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-30 11:18:12 +00:00
simplesshd/dropbear
Greg Alexander 7879c603fe Make a naive IP address decoder for the case where the library's
getnameinfo() doesn't work (Android 16).
2019-06-16 22:14:29 -04:00
..
debian stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
libtomcrypt Merge branch 'dropbear' 2019-06-15 23:36:15 -04:00
libtommath stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
.hg_archival.txt stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
.hgsigs stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
.travis.yml stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
agentfwd.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
algo.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
atomicio.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
atomicio.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
auth.h Merge branch 'dropbear' 2019-06-15 23:36:15 -04:00
bignum.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
bignum.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
buffer.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
buffer.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
CHANGES stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
channel.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
chansession.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
circbuffer.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
circbuffer.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-agentfwd.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-auth.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-authinteract.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-authpasswd.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-authpubkey.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-channel.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-chansession.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-kex.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-main.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-runopts.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-session.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
cli-tcpfwd.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
common-algo.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
common-channel.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
common-chansession.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
common-kex.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
common-runopts.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
common-session.c Disable DROPBEAR_SVR_MULTIUSER, because we don't want to be calling 2019-06-16 19:46:16 -04:00
compat.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
compat.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
config.guess stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
config.h.in stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
config.sub stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
configure stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
configure.ac stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
crypto_desc.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
crypto_desc.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
curve25519-donna.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbclient.1 stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbhelpers.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbhelpers.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbmalloc.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbmalloc.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbmulti.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbrandom.c Merge branch 'dropbear' 2019-06-15 23:36:15 -04:00
dbrandom.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dbutil.c Merge branch 'dropbear' 2019-06-15 23:36:15 -04:00
dbutil.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
debug.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
default_options.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dh_groups.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dh_groups.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dropbear.8 stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dropbearconvert.1 stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dropbearconvert.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dropbearkey.1 stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dropbearkey.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dss.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
dss.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
ecc.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
ecc.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
ecdsa.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
ecdsa.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fake-rfc2553.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
fake-rfc2553.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
filelist.txt stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
fuzz-common.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzz-harness.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzz-hostkeys.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzz-wrapfd.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzz-wrapfd.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzz.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzzer-kexdh.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzzer-kexecdh.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
FUZZER-NOTES.md stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzzer-preauth_nomaths.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzzer-preauth.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzzer-pubkey.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzzer-verify.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
fuzzers_test.sh stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
gendss.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
gendss.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
genrsa.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
genrsa.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
gensignkey.c use rename() if the underlying filesystem doesn't support link() 2019-06-16 20:12:17 -04:00
gensignkey.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
ifndef_wrapper.sh stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
includes.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
INSTALL stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
install-sh stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
kex.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
keyimport.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
keyimport.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
LICENSE stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
list.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
list.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
listener.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
listener.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
localoptions.h Disable DROPBEAR_SVR_MULTIUSER, because we don't want to be calling 2019-06-16 19:46:16 -04:00
loginrec.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
loginrec.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
ltc_prng.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
ltc_prng.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
Makefile.in stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
MULTI stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
netio.c Make a naive IP address decoder for the case where the library's 2019-06-16 22:14:29 -04:00
netio.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
options.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
packet.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
packet.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
process-packet.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
progressmeter.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
progressmeter.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
queue.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
queue.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
README stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
release.sh stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
rsa.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
rsa.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
runopts.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
scp.c Merge branch 'dropbear' 2019-06-15 23:36:15 -04:00
scpmisc.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
scpmisc.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
service.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
session.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
signkey.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
signkey.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
SMALL stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ssh.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
sshpty.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
sshpty.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-agentfwd.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-auth.c Add type cast to avoid warning. 2019-06-15 23:45:11 -04:00
svr-authpam.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-authpasswd.c Merge branch 'dropbear' 2019-06-15 23:36:15 -04:00
svr-authpubkey.c Merge branch 'dropbear' 2019-06-15 23:36:15 -04:00
svr-authpubkeyoptions.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-chansession.c Disable DROPBEAR_SVR_MULTIUSER, because we don't want to be calling 2019-06-16 19:46:16 -04:00
svr-kex.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-main.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-runopts.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-service.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-session.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-tcpfwd.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
svr-x11fwd.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
sysoptions.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
tcp-accept.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
tcpfwd.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
termcodes.c stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
termcodes.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00
x11fwd.h stock dropbear-2019.78 source tree 2019-06-09 16:44:26 -04:00

This is Dropbear, a smallish SSH server and client.
https://matt.ucc.asn.au/dropbear/dropbear.html

INSTALL has compilation instructions.

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.

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


In the absence of detailed documentation, some notes follow:
============================================================================

Server public key auth:

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:

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
user. Beware of editors that split the key into multiple lines.

Dropbear supports some options for authorized_keys entries, see the manpage.

============================================================================

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.

If you have an OpenSSH-style private key ~/.ssh/id_rsa, you need to do:

dropbearconvert openssh dropbear ~/.ssh/id_rsa  ~/.ssh/id_rsa.db
dbclient -i ~/.ssh/id_rsa.db <hostname>

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.

============================================================================

To run the server, you need to generate server keys, this is one-off:
./dropbearkey -t rsa -f dropbear_rsa_host_key
./dropbearkey -t dss -f dropbear_dss_host_key
./dropbearkey -t ecdsa -f dropbear_ecdsa_host_key

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 
/etc/dropbear/ exists and then pass '-R' to the dropbear server.

============================================================================

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.