Go to file
Matt Johnston 3e29368cbc merge of '9879f7138f243bb2077a06e4c9ea925fa34abe2b'
and 'e28650f207028a45182fc2de545b7bd218d13077'

--HG--
extra : convert_revision : f6be8d819a89338780799d813f64be24d4b8ad84
2008-03-27 10:19:36 +00:00
debian Update to debian 0.50-4 diff 2008-03-27 10:19:28 +00:00
libtomcrypt propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head c1db4398d56c56c6d06ae1e20c1e0d04dbb598ed) 2007-01-11 04:29:08 +00:00
libtommath fix missing endif 2007-01-11 06:03:09 +00:00
agentfwd.h
algo.h
atomicio.c
atomicio.h
auth.h Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep 2008-01-13 03:55:59 +00:00
bignum.c
bignum.h
buffer.c
buffer.h
CHANGES Mention 0.51-test2 changes 2008-03-01 02:01:35 +00:00
channel.h Rearrange the channel buffer sizes into three neat use-editable values in 2007-07-24 15:40:23 +00:00
chansession.h
circbuffer.c
circbuffer.h
cli-algo.c
cli-auth.c Allow reading dbclient password from an environment var 2007-03-17 06:30:11 +00:00
cli-authinteract.c BUG: The strings 'name' and 'instruction' are always allocated 2006-07-07 07:00:10 +00:00
cli-authpasswd.c Add support for SSH_ASKPASS_ALWAYS env variable for dbclient. If it 2007-09-14 00:19:44 +00:00
cli-authpubkey.c Remove double-free due to the same "fix" for a leak getting merged in 2007-02-11 10:46:44 +00:00
cli-channel.c Rearranged some more bits, marked some areas that need work. 2006-10-02 16:34:06 +00:00
cli-chansession.c Add -W <windowsize> argument and document it. 2007-07-25 15:44:25 +00:00
cli-kex.c Remove a newline from the kex prompt question, from FreeWRT 2007-02-25 09:48:13 +00:00
cli-main.c Disable core dumps 2007-02-12 10:43:44 +00:00
cli-runopts.c Make sure declarations of variables are at the top of function, 2007-09-11 12:00:18 +00:00
cli-service.c Fixes from Erik Hovland: 2006-07-07 09:17:18 +00:00
cli-session.c Fix for -pedantic -ansi compilation, change // to /**/, plus some signedness 2007-02-16 14:42:08 +00:00
cli-tcpfwd.c
common-algo.c Add comments about requiring keysize <= 2*SHA1_HASH_SIZE 2007-02-04 10:31:48 +00:00
common-channel.c Don't return until the shell has quit. This will ensure that an exit status 2008-02-21 14:46:15 +00:00
common-chansession.c
common-kex.c - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
common-runopts.c
common-session.c - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
compat.c
compat.h
config.guess Update to latest 2007-02-02 10:11:31 +00:00
config.sub Update to latest 2007-02-02 10:11:31 +00:00
configure.in Fix to allow building from a separate directory, patch from Ricardo Martins 2007-10-18 12:18:44 +00:00
dbclient.1 - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
dbmulti.c
dbutil.c Fix for -pedantic -ansi compilation, change // to /**/, plus some signedness 2007-02-16 14:42:08 +00:00
dbutil.h Disable core dumps 2007-02-12 10:43:44 +00:00
debug.h Turn off DEBUG_TRACE 2007-02-12 13:37:58 +00:00
dropbear.8 - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
dropbearconvert.c
dropbearkey.8
dropbearkey.c Make dropbearkey only generate 1024 bit keys 2007-08-08 15:57:50 +00:00
dss.c merge of '182c2d8dbd5321ef4d1df8758936f4dc7127015f' 2006-12-06 13:11:41 +00:00
dss.h
fake-rfc2553.c
fake-rfc2553.h
filelist.txt
gendss.c
gendss.h
genrsa.c
genrsa.h
includes.h - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
INSTALL Fix spelling typo 2007-07-19 14:07:41 +00:00
install-sh
kex.h - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
keyimport.c Fixes from Erik Hovland: 2006-07-07 09:17:18 +00:00
keyimport.h
LICENSE - Include netinet/in.h before arpa/inet.h for FreeBSD 2006-12-06 13:09:32 +00:00
listener.c
listener.h
loginrec.c
loginrec.h
Makefile.in %s/ranlib/$(RANLIB)/ 2007-01-11 03:13:43 +00:00
MULTI
options.h Prepare for 0.50 release 2007-08-08 15:27:41 +00:00
packet.c Fix delayed packet queue handling 2007-08-08 15:48:52 +00:00
packet.h Prevent invalid packets being sent during key-exchange, instead queue 2007-07-27 17:13:42 +00:00
process-packet.c - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
progressmeter.c
progressmeter.h
queue.c
queue.h
random.c Just use /dev/urandom since that's what everyone ends up using anyway. 2007-07-19 15:47:32 +00:00
random.h Just use /dev/urandom since that's what everyone ends up using anyway. 2007-07-19 15:47:32 +00:00
README Update to LibTomCrypt 1.16 2007-01-11 02:22:00 +00:00
rsa.c merge of '182c2d8dbd5321ef4d1df8758936f4dc7127015f' 2006-12-06 13:11:41 +00:00
rsa.h
runopts.h - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
scp.c Stop scp passing arguments that dbclient doesn't understand 2007-07-28 08:59:24 +00:00
scpmisc.c
scpmisc.h
service.h
session.h - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
signkey.c Improve known_hosts checking. 2007-02-22 15:29:32 +00:00
signkey.h Improve known_hosts checking. 2007-02-22 15:29:32 +00:00
SMALL
ssh.h
sshpty.c
sshpty.h
svr-agentfwd.c Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep 2008-01-13 03:55:59 +00:00
svr-algo.c
svr-auth.c Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep 2008-01-13 03:55:59 +00:00
svr-authpam.c Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep 2008-01-13 03:55:59 +00:00
svr-authpasswd.c Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep 2008-01-13 03:55:59 +00:00
svr-authpubkey.c Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep 2008-01-13 03:55:59 +00:00
svr-chansession.c fix up after merge 2008-01-13 04:02:08 +00:00
svr-kex.c Fixes from Erik Hovland: 2006-07-07 09:17:18 +00:00
svr-main.c - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
svr-runopts.c - Add -K keepalive flag for dropbear and dbclient 2007-08-08 15:12:06 +00:00
svr-service.c
svr-session.c Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep 2008-01-13 03:55:59 +00:00
svr-tcpfwd.c Fix free() of null pointer found by Klocwork 2007-02-03 09:42:22 +00:00
svr-x11fwd.c
tcp-accept.c Fix for -pedantic -ansi compilation, change // to /**/, plus some signedness 2007-02-16 14:42:08 +00:00
tcpfwd.h
termcodes.c
termcodes.h
TODO Update to LibTomMath 0.40 2007-01-11 03:11:15 +00:00
x11fwd.h

This is Dropbear, a smallish SSH 2 server and client.

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.

NOTE: Dropbear ignores authorized_keys options such as those described in the
OpenSSH sshd manpage, and will not allow a login for these keys. 

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

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>

Currently encrypted keys aren't supported, neither is agent forwarding. At some
stage both hopefully will be.

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

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

or alternatively convert OpenSSH keys to Dropbear:
./dropbearconvert openssh dropbear /etc/ssh/ssh_host_dsa_key dropbear_dss_host_key

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

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.