Go to file
Matt Johnston 08cb903731 -i works with scp now.
--HG--
extra : convert_revision : 0d1ed055bb2e8b8eca60cbf1cb8cab81688dbead
2004-10-17 10:35:19 +00:00
debian 0.44test4 probably 2004-09-14 13:22:32 +00:00
agentfwd.h Mostly done with the listener changeover 2004-06-03 17:22:48 +00:00
algo.h snapshot of stuff 2004-07-26 02:44:20 +00:00
atomicio.c get rid of the substitution... We want a fixed identifier 2004-07-30 11:27:52 +00:00
atomicio.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
auth.h svr-authpam code merged and works. needs tidying a log 2004-08-08 16:57:37 +00:00
bignum.c Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
bignum.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
buffer.c - added circular buffering for channels 2004-08-26 13:16:40 +00:00
buffer.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
CHANGES -i works with scp now. 2004-10-17 10:35:19 +00:00
channel.h 0.44test4 probably 2004-09-14 13:22:32 +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 - added circular buffering for channels 2004-08-26 13:16:40 +00:00
circbuffer.h - added circular buffering for channels 2004-08-26 13:16:40 +00:00
cli-algo.c snapshot of stuff 2004-07-26 02:44:20 +00:00
cli-auth.c Leak found with MallocDebug - it's kinda useful 2004-08-30 15:02:45 +00:00
cli-authpasswd.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
cli-authpubkey.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
cli-channel.c Nasty. 2004-08-24 18:12:18 +00:00
cli-chansession.c merge of 50be59810e462f9f44f55e421227d6aa0b31982b 2004-08-27 14:39:01 +00:00
cli-kex.c Fix if the first write fails 2004-08-24 07:22:36 +00:00
cli-main.c merge of 50be59810e462f9f44f55e421227d6aa0b31982b 2004-08-27 14:39:01 +00:00
cli-runopts.c -i works with scp now. 2004-10-17 10:35:19 +00:00
cli-service.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
cli-session.c - added circular buffering for channels 2004-08-26 13:16:40 +00:00
cli-tcpfwd.c - added circular buffering for channels 2004-08-26 13:16:40 +00:00
common-algo.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
common-channel.c merge of 50be59810e462f9f44f55e421227d6aa0b31982b 2004-08-27 14:39:01 +00:00
common-chansession.c Chantype handling is sorted 2004-06-02 04:59:49 +00:00
common-kex.c Check for non-matching algos properly 2004-09-02 15:24:17 +00:00
common-runopts.c - client pubkey auth works 2004-08-06 16:18:01 +00:00
common-session.c - added circular buffering for channels 2004-08-26 13:16:40 +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 Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
config.sub Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
configure.in propagate of f51a272341ee12268fe7028bc2f2bad66c603069 and ab35ee4292ea910d4871c3609d6100fe34300720 from branch 'matt.dbclient.rez' to 'matt.dbclient.work' 2004-09-14 13:09:29 +00:00
dbmulti.c Add help text that a symlink to "ssh" works 2004-08-27 15:20:47 +00:00
dbutil.c calloc memory rather than mallocing it - can't hurt too much, and is 2004-09-14 13:18:16 +00:00
dbutil.h merge of 50be59810e462f9f44f55e421227d6aa0b31982b 2004-08-27 14:39:01 +00:00
debug.h merge of 50be59810e462f9f44f55e421227d6aa0b31982b 2004-08-27 14:39:01 +00:00
dropbear.8 Added dropbear.8 and dropbearkey.8 back in 2004-09-14 15:26:50 +00:00
dropbearconvert.c DEBUG_TRACE now only triggers with -v on the cmdline 2004-08-18 15:48:25 +00:00
dropbearkey.8 Added dropbear.8 and dropbearkey.8 back in 2004-09-14 15:26:50 +00:00
dropbearkey.c DEBUG_TRACE now only triggers with -v on the cmdline 2004-08-18 15:48:25 +00:00
dss.c default initialisers for mp_ints 2004-08-17 10:20:20 +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 merge of 5c31199418631253a3d311fe3b1ff87351e1c9ca 2004-08-24 04:07:41 +00:00
gendss.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
genrsa.c default initialisers for mp_ints 2004-08-17 10:20:20 +00:00
genrsa.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
includes.h - added circular buffering for channels 2004-08-26 13:16:40 +00:00
INSTALL Some doc changes 2004-08-13 10:58:51 +00:00
install-sh Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
kex.h Progressing client support 2004-07-27 16:30:46 +00:00
keyimport.c Some small fixes for unused vars, and old messages 2004-08-17 11:14:13 +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 boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
listener.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +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 get rid of the substitution... We want a fixed identifier 2004-07-30 11:27:52 +00:00
loginrec.h get rid of the substitution... We want a fixed identifier 2004-07-30 11:27:52 +00:00
Makefile.in use inst_ rather than inst, so it doesn't try to install "all". 2004-09-21 12:14:20 +00:00
MULTI Some doc changes 2004-08-13 10:58:51 +00:00
options.h Oops, PAM was on by default in options.h 2004-09-14 13:47:10 +00:00
packet.c Merging in the changes from 0.41-0.43 main Dropbear tree 2004-08-12 16:41:58 +00:00
packet.h merge of abac2150ee4f4031a98016241fbd136d24fed127 2004-06-23 07:14:16 +00:00
process-packet.c Remove some unused commented-out code 2004-08-01 11:02:44 +00:00
progressmeter.c get rid of the substitution... We want a fixed identifier 2004-07-30 11:27:52 +00:00
progressmeter.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
queue.c Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
queue.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
random.c Merging in the changes from 0.41-0.43 main Dropbear tree 2004-08-12 16:41:58 +00:00
random.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
README merge of 00b67a11e33c3ed390556805ed6d1078528bee70 2004-09-04 14:19:17 +00:00
rsa.c default initialisers for mp_ints 2004-08-17 10:20:20 +00:00
rsa.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
runopts.h Change the way we load keys/ports so we don't print error messages into our 2004-08-23 05:27:34 +00:00
scp.c Fix for "-l" scp option 2004-08-24 05:05:48 +00:00
scpmisc.c get rid of the substitution... We want a fixed identifier 2004-07-30 11:27:52 +00:00
scpmisc.h Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
service.h Client mostly works up to password auth 2004-07-28 16:44:16 +00:00
session.h propagate of 82bb923d0154750ef716b66b498561f882891946 and f51a272341ee12268fe7028bc2f2bad66c603069 from branch 'matt.dbclient.work' to 'matt.dbclient.rez' 2004-09-21 10:08:21 +00:00
signkey.c Nasty. 2004-08-24 18:12:18 +00:00
signkey.h - Hostkey checking is mostly there, just aren't appending yet. 2004-08-08 16:17:05 +00:00
SMALL Makefile.in contains updated files required 2004-06-01 02:46:09 +00:00
ssh.h merge of abac2150ee4f4031a98016241fbd136d24fed127 2004-06-23 07:14:16 +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 merge of 50be59810e462f9f44f55e421227d6aa0b31982b 2004-08-27 14:39:01 +00:00
svr-algo.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
svr-auth.c PAM improvements 2004-09-14 12:51:16 +00:00
svr-authpam.c strdup() variables correctly for the PAM conversation function 2004-09-21 11:42:03 +00:00
svr-authpasswd.c Don't need to burn the payload buffer since process-packet.c does it 2004-09-12 05:53:48 +00:00
svr-authpubkey.c Merging in the changes from 0.41-0.43 main Dropbear tree 2004-08-12 16:41:58 +00:00
svr-chansession.c Initialise the "lastexit" variable so that we don't get session channels 2004-10-17 08:19:47 +00:00
svr-kex.c default initialisers for mp_ints 2004-08-17 10:20:20 +00:00
svr-main.c Load the hostkeys for inetd too - oops 2004-08-30 13:26:42 +00:00
svr-runopts.c PAM improvements 2004-09-14 12:51:16 +00:00
svr-service.c Progressing client support 2004-07-27 16:30:46 +00:00
svr-session.c Fix for printing out things with inetd mode when we have DEBUG_TRACE 2004-08-22 09:23:11 +00:00
svr-tcpfwd.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
svr-x11fwd.c merge of 50be59810e462f9f44f55e421227d6aa0b31982b 2004-08-27 14:39:01 +00:00
tcp-accept.c License boilerplate etc, add Mihnea as an author to some of the files 2004-08-14 17:54:20 +00:00
tcpfwd.h - added circular buffering for channels 2004-08-26 13:16:40 +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 merge of 00b67a11e33c3ed390556805ed6d1078528bee70 2004-09-04 14:19:19 +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.

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 near the top of the scp.c file. By default
the progress meter isn't compiled in to save space, you can enable it by 
adding 'SCPPROGRESS=1' to the make commandline.