Go to file
Matt Johnston 2028b1b517 Add noreturn and format attribute hints for some functions.
--HG--
extra : convert_revision : 6cc8735d01f0360b918edc26be05681725c0022a
2011-04-07 12:59:18 +00:00
debian Update changelog for 0.53.1 2011-03-02 13:23:27 +00:00
libtomcrypt - Add Counter Mode support 2008-09-29 13:53:31 +00:00
libtommath Use mp_init_size() to avoid some mp_grow()s 2011-03-18 14:31:07 +00:00
agentfwd.h Agent forwarding works 2009-07-30 15:14:33 +00:00
algo.h - Disable compression for non-final multihops 2009-09-11 14:02:04 +00:00
atomicio.c atomicio.c: one less compile warning 2004-12-19 07:43:37 +00:00
atomicio.h
auth.h - set $SSH_ORIGINAL_COMMAND if a command is forced, and log it 2009-08-26 14:09:22 +00:00
bignum.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
bignum.h - refactored random mp_int generation and byte->mp_int code 2005-05-05 03:58:21 +00:00
buffer.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
buffer.h New standard linked list to use, rather than adhoc SignKeyList or TCPFwdList 2009-07-06 12:59:13 +00:00
CHANGES Update changelog for 0.53.1 2011-03-02 13:23:27 +00:00
channel.h Make it compile, update for changes in channel structure. 2009-07-01 04:53:17 +00:00
chansession.h - Set $SSH_CONNECTION 2009-09-02 14:47:12 +00:00
circbuffer.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
circbuffer.h - added circular buffering for channels 2004-08-26 13:16:40 +00:00
cli-agentfwd.c Tidy error handling and get rid of some commented out code 2011-04-07 12:30:20 +00:00
cli-algo.c Change comparison to be more paranoid (and perhaps avoid Klocwork false 2011-04-07 11:18:35 +00:00
cli-auth.c - Client auth using an agent's key works. Still need to implement client 2009-07-06 14:02:45 +00:00
cli-authinteract.c Fix memory leak found by Klocwork 2011-04-07 12:34:44 +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 Agent forwarding works 2009-07-30 15:14:33 +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 Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
cli-kex.c Rearrange getaddrstring() etc 2009-09-01 16:38:26 +00:00
cli-main.c Add noreturn and format attribute hints for some functions. 2011-04-07 12:59:18 +00:00
cli-runopts.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
cli-service.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
cli-session.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
cli-tcpfwd.c remove unused variable 2010-07-21 14:07:13 +00:00
common-algo.c Add diffie-hellman-group14-sha1 KEX method 2011-02-24 12:42:42 +00:00
common-channel.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
common-chansession.c
common-kex.c Refer to RFCs rather than drafts, update some section references 2011-02-27 13:57:32 +00:00
common-runopts.c
common-session.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
compat.c Small fixes 2004-08-17 10:40:31 +00:00
compat.h License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
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 Work properly again with bundled libtom*. autoconf is a hassle. 2010-07-21 13:27:44 +00:00
dbclient.1 Mention -L/-R listenaddress argument in manpage 2011-02-24 14:18:13 +00:00
dbmulti.c Add help text that a symlink to "ssh" works 2004-08-27 15:20:47 +00:00
dbutil.c Add noreturn and format attribute hints for some functions. 2011-04-07 12:59:18 +00:00
dbutil.h Add noreturn and format attribute hints for some functions. 2011-04-07 12:59:18 +00:00
debug.h - Test for pam_fail_delay() function in configure 2009-09-08 14:53:53 +00:00
dropbear.8 Mention -p's address argument in manpage synopsis 2009-09-13 15:31:29 +00:00
dropbearconvert.c DEBUG_TRACE now only triggers with -v on the cmdline 2004-08-18 15:48:25 +00:00
dropbearkey.8 Mention DSS and DSA being the same thing 2008-11-09 10:59:19 +00:00
dropbearkey.c Refer to RFCs rather than drafts, update some section references 2011-02-27 13:57:32 +00:00
dss.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
dss.h Rename rsa_key to dropbear_rsa_key (and same for dss too) so 2010-07-21 12:55:25 +00:00
fake-rfc2553.c - Update fake-rfc2553.{c,h} from OpenSSH 5.5p1 2010-07-21 13:53:23 +00:00
fake-rfc2553.h - Update fake-rfc2553.{c,h} from OpenSSH 5.5p1 2010-07-21 13:53:23 +00:00
filelist.txt filelist.txt 2004-08-14 18:06:28 +00:00
gendss.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
gendss.h Rename rsa_key to dropbear_rsa_key (and same for dss too) so 2010-07-21 12:55:25 +00:00
genrsa.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
genrsa.h Rename rsa_key to dropbear_rsa_key (and same for dss too) so 2010-07-21 12:55:25 +00:00
includes.h Use system libtomcrypt/libtommath if available. Doesn't currently 2010-07-21 12:38:46 +00:00
INSTALL Fix spelling typo 2007-07-19 14:07:41 +00:00
install-sh
kex.h Add support for zlib@openssh.com delayed compression. 2008-09-29 02:23:04 +00:00
keyimport.c Remove an unused variable 2008-09-22 14:13:14 +00:00
keyimport.h License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
LICENSE LICENSE - Update copyright to 2008 2008-11-05 13:53:14 +00:00
list.c New standard linked list to use, rather than adhoc SignKeyList or TCPFwdList 2009-07-06 12:59:13 +00:00
list.h New standard linked list to use, rather than adhoc SignKeyList or TCPFwdList 2009-07-06 12:59:13 +00:00
listener.c Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place 2005-01-02 20:25:56 +00:00
listener.h License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
loginrec.c Give a umask argument to open() in loginrec 2008-11-05 13:14:38 +00:00
loginrec.h Cleaning out various dead wood found with -dead_strip 2004-12-20 14:24:57 +00:00
Makefile.in -lcrypt needs to be before object files when static linking 2011-02-25 12:14:33 +00:00
MULTI
options.h merge of '8a608f0ed5e4b491dba4bf330e560636ec7376fd' 2011-02-28 13:51:34 +00:00
packet.c - Don't allow setting memLevel since that doesn't work properly 2011-02-28 13:51:27 +00:00
packet.h - Get rid of decryptreadbuf, just decrypt in-place with readbuf 2009-03-01 16:15:57 +00:00
process-packet.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
progressmeter.c Update to scp from OpenSSH portable 4.3p2 2006-03-08 14:20:24 +00:00
progressmeter.h
queue.c * use own assertions which should get logged properly 2005-09-05 15:16:10 +00:00
queue.h
random.c - Fix DROPBEAR_PRNGD_SOCKET since it doesn't need to call connect() 2011-02-27 13:12:17 +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 Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
rsa.h Rename rsa_key to dropbear_rsa_key (and same for dss too) so 2010-07-21 12:55:25 +00:00
runopts.h - Disable compression for non-final multihops 2009-09-11 14:02:04 +00:00
scp.c - Remove options that dbclient won't know about 2009-09-02 15:17:14 +00:00
scpmisc.c Update to scp from OpenSSH portable 4.3p2 2006-03-08 14:20:24 +00:00
scpmisc.h put back the TIMEVAL_TO_TIMESPEC and timersub macros for Linux 2006-03-11 14:57:12 +00:00
service.h
session.h Add noreturn and format attribute hints for some functions. 2011-04-07 12:59:18 +00:00
signkey.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
signkey.h Rename rsa_key to dropbear_rsa_key (and same for dss too) so 2010-07-21 12:55:25 +00:00
SMALL 0.44 release changes 2005-01-02 17:08:27 +00:00
ssh.h propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712) 2006-03-21 16:20:59 +00:00
sshpty.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
sshpty.h
svr-agentfwd.c Compile fix for when both client and server agent forwarding is disabled 2011-02-28 13:39:18 +00:00
svr-algo.c Change comparison to be more paranoid (and perhaps avoid Klocwork false 2011-04-07 11:18:35 +00:00
svr-auth.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-authpam.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-authpasswd.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-authpubkey.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-authpubkeyoptions.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-chansession.c Avoid segfault when handling childpid race 2011-03-31 14:42:11 +00:00
svr-kex.c Refer to RFCs rather than drafts, update some section references 2011-02-27 13:57:32 +00:00
svr-main.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-runopts.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-service.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-session.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
svr-tcpfwd.c - Progress for allowing specifying a listenaddr for tcp forwards 2010-02-24 16:13:15 +00:00
svr-x11fwd.c Improve capitalisation for all logged strings 2011-02-23 15:50:30 +00:00
sysoptions.h Update changelog for 0.53.1 2011-03-02 13:23:27 +00:00
tcp-accept.c - Progress for allowing specifying a listenaddr for tcp forwards 2010-02-24 16:13:15 +00:00
tcpfwd.h - tcpfwd bindaddr support against trunk. needs merging. 2010-02-27 11:51:19 +00:00
termcodes.c #ifdef for PENDIN 2004-08-17 10:29:04 +00:00
termcodes.h
TODO Update to LibTomCrypt 1.16 2007-01-11 02:22:00 +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.