Go to file
2016-01-14 21:54:58 +08:00
debian Added missing init info field to debian init script. 2016-01-03 14:42:57 +00:00
libtomcrypt Fix unused but set variable warnings [-Werror=unused-but-set-variable] 2015-05-05 20:39:13 +02:00
libtommath
.hgsigs Added signature for changeset 926e7275cef4 2015-12-03 21:33:48 +08:00
.hgtags Added tag DROPBEAR_2015.71 for changeset 9a944a243f08 2015-12-03 21:33:43 +08:00
.travis.yml Build with -Werror for the simplest case 2015-08-04 08:20:50 +08:00
agentfwd.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
algo.h Turn Algo_Type's name attribute into const char * 2015-05-05 20:39:14 +02:00
atomicio.c
atomicio.h
auth.h Fix pointer differ in signess warnings [-Werror=pointer-sign] 2015-05-05 20:39:13 +02:00
bignum.c Various cleanups and fixes for warnings 2013-11-12 23:02:32 +08:00
bignum.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
buffer.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
buffer.h buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
CHANGES Thanks 2015-12-03 21:40:31 +08:00
channel.h Turn start_send_channel_request()'s type argument into char * 2015-05-05 20:39:13 +02:00
chansession.h Turn ChanSess's cmd attribute into char * 2015-05-05 20:39:14 +02:00
circbuffer.c lazy allocation of circbuffer 2015-11-19 23:52:11 +08:00
circbuffer.h Fix no-writev fallback 2015-05-02 22:47:25 +08:00
cli-agentfwd.c allocate buffer and data in a single allocation 2015-03-01 21:16:09 +08:00
cli-auth.c avoid getpass when not used 2015-10-21 22:39:55 +08:00
cli-authinteract.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
cli-authpasswd.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
cli-authpubkey.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
cli-channel.c
cli-chansession.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
cli-kex.c Use dropbear_log instead of some fprintf's in client code. 2015-12-15 16:52:53 +03:00
cli-main.c use exec for proxycommand 2015-12-18 21:20:46 +08:00
cli-runopts.c revert removal of space handling, different fix for avoiding option prefix 2015-12-15 22:57:22 +08:00
cli-session.c Support syslog logging in dbclient. 2015-12-15 16:52:53 +03:00
cli-tcpfwd.c A few minor style fixes 2015-12-15 22:09:55 +08:00
common-algo.c Move dh group constants to a separate file 2016-01-14 21:54:58 +08:00
common-channel.c Fix "Avoid queueing into circbuffer when the channel is about to close" 2015-11-27 22:19:08 +08:00
common-chansession.c
common-kex.c Move dh group constants to a separate file 2016-01-14 21:54:58 +08:00
common-runopts.c - Don't use multichar constants since recent gcc complains 2014-07-27 22:55:29 +08:00
common-session.c Fix ses.channel_signal_pending race 2015-11-27 21:26:43 +08:00
compat.c
compat.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
config.guess another new config.guess 2013-06-10 2013-11-14 22:07:18 +08:00
config.sub Update to 2013-10-01 2013-12-03 21:36:12 +08:00
configure.ac The '==' comparision operator is not defined by POSIX, use '=' instead 2015-11-30 20:55:07 +08:00
crypto_desc.c Be safer with how we handle ltc_ecc_sets[] (particularly with 2013-04-09 22:44:19 +08:00
crypto_desc.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
curve25519-donna.c Fix for old compilers, variable declarations at beginning of functions 2015-02-24 20:51:18 +08:00
dbclient.1 use exec for proxycommand 2015-12-18 21:20:46 +08:00
dbmulti.c
dbrandom.c Turn addrandom()'s buf argument into unsigned char * 2015-05-05 20:39:13 +02:00
dbrandom.h Turn addrandom()'s buf argument into unsigned char * 2015-05-05 20:39:13 +02:00
dbutil.c Allow setting syslog identifier via startsyslog(). 2015-12-15 16:43:29 +03:00
dbutil.h Allow setting syslog identifier via startsyslog(). 2015-12-15 16:43:29 +03:00
debug.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
dh_groups.c Move dh group constants to a separate file 2016-01-14 21:54:58 +08:00
dh_groups.h Move dh group constants to a separate file 2016-01-14 21:54:58 +08:00
dropbear.8 Fix minor manpage formatting issues 2015-11-25 20:46:06 +08:00
dropbearconvert.1 Fix minor manpage formatting issues 2015-11-25 20:46:06 +08:00
dropbearconvert.c rename random.h to dbrandom.h since some OSes have a system random.h 2013-11-14 22:05:47 +08:00
dropbearkey.1 Fix minor manpage formatting issues 2015-11-25 20:46:06 +08:00
dropbearkey.c Default client key path ~/.ssh/id_dropbear 2015-01-24 00:05:26 +08:00
dss.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
dss.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
ecc.c Fix some memory leaks in ecc code 2015-03-01 22:44:36 +08:00
ecc.h Turn dropbear_ecc_curve's name into const char * 2015-05-05 20:39:14 +02:00
ecdsa.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
ecdsa.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
fake-rfc2553.c
fake-rfc2553.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
filelist.txt
gendss.c Fix pointer differ in signess warnings [-Werror=pointer-sign] 2015-05-05 20:39:13 +02:00
gendss.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
genrsa.c generate RSA keys of exact length 2014-02-14 23:18:45 +08:00
genrsa.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
gensignkey.c Open directories O_RDONLY for fsync, add debugging if it fails 2015-01-04 22:22:43 +08:00
gensignkey.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
includes.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
INSTALL
install-sh
kex.h Move dh group constants to a separate file 2016-01-14 21:54:58 +08:00
keyimport.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
keyimport.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
LICENSE Fix no-writev fallback 2015-05-02 22:47:25 +08:00
list.c
list.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
listener.c Free memory before exiting. Based on patch from Thorsten Horstmann. 2015-02-24 22:01:33 +08:00
listener.h Free memory before exiting. Based on patch from Thorsten Horstmann. 2015-02-24 22:01:33 +08:00
loginrec.c If running as non-root only allow that user to log in 2013-04-17 22:29:18 +08:00
loginrec.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
ltc_prng.c rename random.h to dbrandom.h since some OSes have a system random.h 2013-11-14 22:05:47 +08:00
ltc_prng.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
Makefile.in Move dh group constants to a separate file 2016-01-14 21:54:58 +08:00
MULTI - Fix "inst_scp" target since there isn't a manpage 2013-10-09 22:24:39 +08:00
netio.c avoid invalidated iterator when connection fails 2015-09-29 22:19:11 +08:00
netio.h separate client/server fastopen options 2015-05-29 23:19:11 +08:00
options.h Test for crypt() rather than crypt.h 2015-10-21 23:08:22 +08:00
packet.c Fix no-writev fallback 2015-05-02 22:47:25 +08:00
packet.h Make main socket nonblocking. Limit writequeue size. 2015-03-20 23:36:42 +08:00
process-packet.c Make -K keepalive behave like OpenSSH's ServerAliveInterval 2014-07-09 00:15:20 +08:00
progressmeter.c
progressmeter.h
queue.c
queue.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
README README: fix ecdsa key generation command 2014-02-09 03:56:50 -05:00
release.sh release.sh reminds how to sign 2015-11-25 23:30:56 +08:00
rsa.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
rsa.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
runopts.h Moved usingsyslog from svr_runopts to runopts. 2015-12-15 16:43:29 +03:00
scp.c S_IWUSR rather than S_IWRITE for scp 2015-11-04 23:22:58 +08:00
scpmisc.c
scpmisc.h
service.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
session.h A few minor style fixes 2015-12-15 22:09:55 +08:00
signkey.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
signkey.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
SMALL
ssh.h
sshpty.c
sshpty.h
svr-agentfwd.c Some minor typo fixes, found by codespell. 2015-02-24 20:45:07 +08:00
svr-auth.c Fix problem where auth timeout wasn't checked when waiting for ident 2015-08-03 21:59:40 +08:00
svr-authpam.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
svr-authpasswd.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
svr-authpubkey.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
svr-authpubkeyoptions.c Fix segfault with restricted authorized_key files without forced command 2015-08-07 23:00:08 +08:00
svr-chansession.c Don't display the MOTD when an explicit command is run. 2015-10-21 22:08:47 +08:00
svr-kex.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
svr-main.c Allow setting syslog identifier via startsyslog(). 2015-12-15 16:43:29 +03:00
svr-runopts.c Moved usingsyslog from svr_runopts to runopts. 2015-12-15 16:43:29 +03:00
svr-service.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
svr-session.c A few minor style fixes 2015-12-15 22:09:55 +08:00
svr-tcpfwd.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
svr-x11fwd.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
sysoptions.h 2015.71 2015-12-03 21:23:54 +08:00
tcp-accept.c buf_getstring and buf_putstring now use non-unsigned char* 2015-06-04 23:08:50 +08:00
tcpfwd.h Turn TCPFwdEntry's connectaddr and listenaddr attributes into char * 2015-05-05 20:39:14 +02:00
termcodes.c
termcodes.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08:00
TODO
x11fwd.h DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +08: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.

See TODO for a few of the things I know need looking at, and please contact
me if you have any questions/bugs found/features/ideas/comments etc :)

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 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.