Go to file
Matt Johnston cd0a08896c Add '-y' option to dbclient to accept the host key without checking
- patch from Luciano Miguel Ferreira Rocha.

--HG--
extra : convert_revision : 924b731b50d4147eed8e9382c98a2573259a6cad
2007-02-11 08:50:21 +00:00
debian 0.49 is close to done. 2006-06-12 16:05:09 +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 Mostly done with the listener changeover 2004-06-03 17:22:48 +00:00
algo.h Switching to libtomcrypt 1.02 2005-05-09 09:32:33 +00:00
atomicio.c atomicio.c: one less compile warning 2004-12-19 07:43:37 +00:00
atomicio.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
auth.h Make the dbclient password prompt more useful 2006-06-12 14:41:32 +00:00
bignum.c - refactored random mp_int generation and byte->mp_int code 2005-05-05 03:58:21 +00:00
bignum.h - refactored random mp_int generation and byte->mp_int code 2005-05-05 03:58:21 +00:00
buffer.c * use own assertions which should get logged properly 2005-09-05 15:16:10 +00:00
buffer.h * fix longstanding bug with connections being closed on failure to 2005-03-13 13:58:14 +00:00
CHANGES 0.49 is close to done. 2006-06-12 16:05:09 +00:00
channel.h * rename infd/outfd to writefd/readfd, to avoid confusion 2005-10-20 16:53:12 +00:00
chansession.h propagate of 82bb923d0154750ef716b66b498561f882891946 and f51a272341ee12268fe7028bc2f2bad66c603069 from branch 'matt.dbclient.work' to 'matt.dbclient.rez' 2004-09-21 10:08:21 +00:00
circbuffer.c * use own assertions which should get logged properly 2005-09-05 15:16:10 +00:00
circbuffer.h - added circular buffering for channels 2004-08-26 13:16:40 +00:00
cli-algo.c Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place 2005-01-02 20:25:56 +00:00
cli-auth.c Make the dbclient password prompt more useful 2006-06-12 14:41:32 +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 Make the dbclient password prompt more useful 2006-06-12 14:41:32 +00:00
cli-authpubkey.c merge of 'b1dd3b94e60a07a176dba2b035ac79968595990a' 2007-02-04 10:32:59 +00:00
cli-channel.c * fix longstanding bug with connections being closed on failure to 2005-03-13 13:58:14 +00:00
cli-chansession.c A few more fixups, make sure that variable declarations are the 2006-03-26 09:26:43 +00:00
cli-kex.c Add '-y' option to dbclient to accept the host key without checking 2007-02-11 08:50:21 +00:00
cli-main.c Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place 2005-01-02 20:25:56 +00:00
cli-runopts.c Add '-y' option to dbclient to accept the host key without checking 2007-02-11 08:50:21 +00:00
cli-service.c Fixes from Erik Hovland: 2006-07-07 09:17:18 +00:00
cli-session.c add -f background option to dbclient 2006-06-07 15:47:04 +00:00
cli-tcpfwd.c * fix -L forwarding on the client, broke last rev 2005-12-06 16:51:55 +00:00
common-algo.c Add comments about requiring keysize <= 2*SHA1_HASH_SIZE 2007-02-04 10:31:48 +00:00
common-channel.c merge of '5fdf69ca60d1683cdd9f4c2595134bed26394834' 2007-02-03 08:20:34 +00:00
common-chansession.c Chantype handling is sorted 2004-06-02 04:59:49 +00:00
common-kex.c merge of 'b1dd3b94e60a07a176dba2b035ac79968595990a' 2007-02-04 10:32:59 +00:00
common-runopts.c - client pubkey auth works 2004-08-06 16:18:01 +00:00
common-session.c Just use the normal "remote closed" handler when reading ident stings 2006-07-27 01:24:39 +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 Avoid using a comma in a message, since I can't be bothered 2007-02-09 10:55:20 +00:00
dbclient.1 Bring in changes from Debian 0.48.1-1 2006-06-07 16:04:14 +00:00
dbmulti.c Add help text that a symlink to "ssh" works 2004-08-27 15:20:47 +00:00
dbutil.c merge of 'b1dd3b94e60a07a176dba2b035ac79968595990a' 2007-02-04 10:32:59 +00:00
dbutil.h * Per-IP connection unauthed connection limits 2006-03-08 12:41:27 +00:00
debug.h CHECKCLEARTOWRITE() can normally be defined blank 2006-07-09 14:58:19 +00:00
dropbear.8 Add -N "no remote command" dbclient option. 2006-06-07 15:01:20 +00:00
dropbearconvert.c DEBUG_TRACE now only triggers with -v on the cmdline 2004-08-18 15:48:25 +00:00
dropbearkey.8 * Add references in the manpages to the dbclient manpage 2005-03-13 16:23:15 +00:00
dropbearkey.c Fixes from Erik Hovland: 2006-07-07 09:17:18 +00:00
dss.c merge of '182c2d8dbd5321ef4d1df8758936f4dc7127015f' 2006-12-06 13:11:41 +00:00
dss.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
fake-rfc2553.c fake-rfc stuff 2004-08-12 14:39:17 +00:00
fake-rfc2553.h fake-rfc stuff 2004-08-12 14:39:17 +00:00
filelist.txt filelist.txt 2004-08-14 18:06:28 +00:00
gendss.c - refactored random mp_int generation and byte->mp_int code 2005-05-05 03:58:21 +00:00
gendss.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
genrsa.c - refactored random mp_int generation and byte->mp_int code 2005-05-05 03:58:21 +00:00
genrsa.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
includes.h merge of '182c2d8dbd5321ef4d1df8758936f4dc7127015f' 2006-12-06 13:11:41 +00:00
INSTALL add note about compiling for 386 2005-09-06 04:04:51 +00:00
install-sh Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
kex.h Make a variables static 2005-08-24 16:43:29 +00:00
keyimport.c Fixes from Erik Hovland: 2006-07-07 09:17:18 +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 - Include netinet/in.h before arpa/inet.h for FreeBSD 2006-12-06 13:09:32 +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 loginrec.c: replaced erroneously removed function definition 2004-12-20 14:46:12 +00:00
loginrec.h Cleaning out various dead wood found with -dead_strip 2004-12-20 14:24:57 +00:00
Makefile.in %s/ranlib/$(RANLIB)/ 2007-01-11 03:13:43 +00:00
MULTI Some doc changes 2004-08-13 10:58:51 +00:00
options.h Fix up separate-directory building for libtomcrypt 2006-10-11 16:00:50 +00:00
packet.c * use own assertions which should get logged properly 2005-09-05 15:16:10 +00:00
packet.h merge of abac2150ee4f4031a98016241fbd136d24fed127 2004-06-23 07:14:16 +00:00
process-packet.c Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place 2005-01-02 20:25:56 +00:00
progressmeter.c Update to scp from OpenSSH portable 4.3p2 2006-03-08 14:20:24 +00:00
progressmeter.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
queue.c * use own assertions which should get logged properly 2005-09-05 15:16:10 +00:00
queue.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
random.c Remove extraneous tests in random mpint generation, 2007-02-03 13:23:18 +00:00
random.h Only read /dev/random once when the program starts 2006-02-11 15:15:37 +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 Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
runopts.h Add '-y' option to dbclient to accept the host key without checking 2007-02-11 08:50:21 +00:00
scp.c code was untested and wrong. 2006-03-08 15:46:24 +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 Client mostly works up to password auth 2004-07-28 16:44:16 +00:00
session.h added keyboard-interactive client support 2005-09-20 17:35:21 +00:00
signkey.c - add explicit check that correct keytype exists for pubkey verification 2005-09-06 03:57:21 +00:00
signkey.h - Hostkey checking is mostly there, just aren't appending yet. 2004-08-08 16:17:05 +00:00
SMALL 0.44 release changes 2005-01-02 17:08:27 +00:00
ssh.h added keyboard-interactive client support 2005-09-20 17:35:21 +00:00
sshpty.c get rid of the substitution... We want a fixed identifier 2004-07-30 11:27:52 +00:00
sshpty.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
svr-agentfwd.c Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place 2005-01-02 20:25:56 +00:00
svr-algo.c Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place 2005-01-02 20:25:56 +00:00
svr-auth.c Some cleanups/fixes for various TRACE statements 2006-03-25 12:57:37 +00:00
svr-authpam.c * add -g (dbclient) and -a (dropbear) options for allowing non-local 2005-12-04 16:13:11 +00:00
svr-authpasswd.c * fix longstanding bug with connections being closed on failure to 2005-03-13 13:58:14 +00:00
svr-authpubkey.c Log when pubkey auth fails because of bad pubkey perms/ownership 2005-09-20 08:59:46 +00:00
svr-chansession.c merge of '1250b8af44b62d8f4fe0f8d9fc7e7a1cc34e7e1c' 2007-02-03 08:20:30 +00:00
svr-kex.c Fixes from Erik Hovland: 2006-07-07 09:17:18 +00:00
svr-main.c Load hostkeys before daemon(), since daemon()'s chdir("/") will prevent us 2007-01-04 02:01:09 +00:00
svr-runopts.c Add -P pidfile patch from Swen Schillig 2006-06-07 14:10:21 +00:00
svr-service.c Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place 2005-01-02 20:25:56 +00:00
svr-session.c Fix potential null pointer dereference found by Klokwork 2007-02-03 09:58:14 +00:00
svr-tcpfwd.c Fix free() of null pointer found by Klocwork 2007-02-03 09:42:22 +00:00
svr-x11fwd.c * fix longstanding bug with connections being closed on failure to 2005-03-13 13:58:14 +00:00
tcp-accept.c Fix memory leak found by Klocwork 2006-11-02 16:45:43 +00:00
tcpfwd.h * fix -L forwarding on the client, broke last rev 2005-12-06 16:51:55 +00:00
termcodes.c #ifdef for PENDIN 2004-08-17 10:29:04 +00:00
termcodes.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
TODO Update to LibTomMath 0.40 2007-01-11 03:11:15 +00:00
x11fwd.h Fixed stupid agentfwd error (using the listening FD, not the accepted on. gah) 2004-06-03 18:08:34 +00:00

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.