8053 beefd0184a 2022-08-08 ct_chen 2 years ago
..
debian beefd0184a 2022-08-08 ct_chen 2 years ago
libtomcrypt beefd0184a 2022-08-08 ct_chen 2 years ago
libtommath beefd0184a 2022-08-08 ct_chen 2 years ago
release beefd0184a 2022-08-08 ct_chen 2 years ago
.hg_archival.txt beefd0184a 2022-08-08 ct_chen 2 years ago
.hgsigs beefd0184a 2022-08-08 ct_chen 2 years ago
.travis.yml beefd0184a 2022-08-08 ct_chen 2 years ago
CHANGES beefd0184a 2022-08-08 ct_chen 2 years ago
INSTALL beefd0184a 2022-08-08 ct_chen 2 years ago
LICENSE beefd0184a 2022-08-08 ct_chen 2 years ago
MULTI beefd0184a 2022-08-08 ct_chen 2 years ago
Makefile beefd0184a 2022-08-08 ct_chen 2 years ago
Makefile.in beefd0184a 2022-08-08 ct_chen 2 years ago
README beefd0184a 2022-08-08 ct_chen 2 years ago
SMALL beefd0184a 2022-08-08 ct_chen 2 years ago
TODO beefd0184a 2022-08-08 ct_chen 2 years ago
agentfwd.h beefd0184a 2022-08-08 ct_chen 2 years ago
algo.h beefd0184a 2022-08-08 ct_chen 2 years ago
atomicio.c beefd0184a 2022-08-08 ct_chen 2 years ago
atomicio.h beefd0184a 2022-08-08 ct_chen 2 years ago
auth.h beefd0184a 2022-08-08 ct_chen 2 years ago
bignum.c beefd0184a 2022-08-08 ct_chen 2 years ago
bignum.h beefd0184a 2022-08-08 ct_chen 2 years ago
buffer.c beefd0184a 2022-08-08 ct_chen 2 years ago
buffer.h beefd0184a 2022-08-08 ct_chen 2 years ago
channel.h beefd0184a 2022-08-08 ct_chen 2 years ago
chansession.h beefd0184a 2022-08-08 ct_chen 2 years ago
circbuffer.c beefd0184a 2022-08-08 ct_chen 2 years ago
circbuffer.h beefd0184a 2022-08-08 ct_chen 2 years ago
cli-agentfwd.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-auth.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-authinteract.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-authpasswd.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-authpubkey.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-channel.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-chansession.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-kex.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-main.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-runopts.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-session.c beefd0184a 2022-08-08 ct_chen 2 years ago
cli-tcpfwd.c beefd0184a 2022-08-08 ct_chen 2 years ago
common-algo.c beefd0184a 2022-08-08 ct_chen 2 years ago
common-channel.c beefd0184a 2022-08-08 ct_chen 2 years ago
common-chansession.c beefd0184a 2022-08-08 ct_chen 2 years ago
common-kex.c beefd0184a 2022-08-08 ct_chen 2 years ago
common-runopts.c beefd0184a 2022-08-08 ct_chen 2 years ago
common-session.c beefd0184a 2022-08-08 ct_chen 2 years ago
compat.c beefd0184a 2022-08-08 ct_chen 2 years ago
compat.h beefd0184a 2022-08-08 ct_chen 2 years ago
config.guess beefd0184a 2022-08-08 ct_chen 2 years ago
config.h beefd0184a 2022-08-08 ct_chen 2 years ago
config.h.in beefd0184a 2022-08-08 ct_chen 2 years ago
config.log beefd0184a 2022-08-08 ct_chen 2 years ago
config.status beefd0184a 2022-08-08 ct_chen 2 years ago
config.sub beefd0184a 2022-08-08 ct_chen 2 years ago
configure beefd0184a 2022-08-08 ct_chen 2 years ago
configure.ac beefd0184a 2022-08-08 ct_chen 2 years ago
crypto_desc.c beefd0184a 2022-08-08 ct_chen 2 years ago
crypto_desc.h beefd0184a 2022-08-08 ct_chen 2 years ago
curve25519-donna.c beefd0184a 2022-08-08 ct_chen 2 years ago
dbclient beefd0184a 2022-08-08 ct_chen 2 years ago
dbclient.1 beefd0184a 2022-08-08 ct_chen 2 years ago
dbhelpers.c beefd0184a 2022-08-08 ct_chen 2 years ago
dbhelpers.h beefd0184a 2022-08-08 ct_chen 2 years ago
dbmulti.c beefd0184a 2022-08-08 ct_chen 2 years ago
dbrandom.c beefd0184a 2022-08-08 ct_chen 2 years ago
dbrandom.h beefd0184a 2022-08-08 ct_chen 2 years ago
dbutil.c beefd0184a 2022-08-08 ct_chen 2 years ago
dbutil.h beefd0184a 2022-08-08 ct_chen 2 years ago
debug.h beefd0184a 2022-08-08 ct_chen 2 years ago
dh_groups.c beefd0184a 2022-08-08 ct_chen 2 years ago
dh_groups.h beefd0184a 2022-08-08 ct_chen 2 years ago
dropbear beefd0184a 2022-08-08 ct_chen 2 years ago
dropbear.8 beefd0184a 2022-08-08 ct_chen 2 years ago
dropbearconvert beefd0184a 2022-08-08 ct_chen 2 years ago
dropbearconvert.1 beefd0184a 2022-08-08 ct_chen 2 years ago
dropbearconvert.c beefd0184a 2022-08-08 ct_chen 2 years ago
dropbearkey beefd0184a 2022-08-08 ct_chen 2 years ago
dropbearkey.1 beefd0184a 2022-08-08 ct_chen 2 years ago
dropbearkey.c beefd0184a 2022-08-08 ct_chen 2 years ago
dss.c beefd0184a 2022-08-08 ct_chen 2 years ago
dss.h beefd0184a 2022-08-08 ct_chen 2 years ago
ecc.c beefd0184a 2022-08-08 ct_chen 2 years ago
ecc.h beefd0184a 2022-08-08 ct_chen 2 years ago
ecdsa.c beefd0184a 2022-08-08 ct_chen 2 years ago
ecdsa.h beefd0184a 2022-08-08 ct_chen 2 years ago
fake-rfc2553.c beefd0184a 2022-08-08 ct_chen 2 years ago
fake-rfc2553.h beefd0184a 2022-08-08 ct_chen 2 years ago
filelist.txt beefd0184a 2022-08-08 ct_chen 2 years ago
gendss.c beefd0184a 2022-08-08 ct_chen 2 years ago
gendss.h beefd0184a 2022-08-08 ct_chen 2 years ago
genrsa.c beefd0184a 2022-08-08 ct_chen 2 years ago
genrsa.h beefd0184a 2022-08-08 ct_chen 2 years ago
gensignkey.c beefd0184a 2022-08-08 ct_chen 2 years ago
gensignkey.h beefd0184a 2022-08-08 ct_chen 2 years ago
includes.h beefd0184a 2022-08-08 ct_chen 2 years ago
install-sh beefd0184a 2022-08-08 ct_chen 2 years ago
kex.h beefd0184a 2022-08-08 ct_chen 2 years ago
keyimport.c beefd0184a 2022-08-08 ct_chen 2 years ago
keyimport.h beefd0184a 2022-08-08 ct_chen 2 years ago
list.c beefd0184a 2022-08-08 ct_chen 2 years ago
list.h beefd0184a 2022-08-08 ct_chen 2 years ago
listener.c beefd0184a 2022-08-08 ct_chen 2 years ago
listener.h beefd0184a 2022-08-08 ct_chen 2 years ago
loginrec.c beefd0184a 2022-08-08 ct_chen 2 years ago
loginrec.h beefd0184a 2022-08-08 ct_chen 2 years ago
ltc_prng.c beefd0184a 2022-08-08 ct_chen 2 years ago
ltc_prng.h beefd0184a 2022-08-08 ct_chen 2 years ago
netio.c beefd0184a 2022-08-08 ct_chen 2 years ago
netio.h beefd0184a 2022-08-08 ct_chen 2 years ago
options.h beefd0184a 2022-08-08 ct_chen 2 years ago
packet.c beefd0184a 2022-08-08 ct_chen 2 years ago
packet.h beefd0184a 2022-08-08 ct_chen 2 years ago
process-packet.c beefd0184a 2022-08-08 ct_chen 2 years ago
progressmeter.c beefd0184a 2022-08-08 ct_chen 2 years ago
progressmeter.h beefd0184a 2022-08-08 ct_chen 2 years ago
queue.c beefd0184a 2022-08-08 ct_chen 2 years ago
queue.h beefd0184a 2022-08-08 ct_chen 2 years ago
release.sh beefd0184a 2022-08-08 ct_chen 2 years ago
rsa.c beefd0184a 2022-08-08 ct_chen 2 years ago
rsa.h beefd0184a 2022-08-08 ct_chen 2 years ago
runopts.h beefd0184a 2022-08-08 ct_chen 2 years ago
scp beefd0184a 2022-08-08 ct_chen 2 years ago
scp.c beefd0184a 2022-08-08 ct_chen 2 years ago
scpmisc.c beefd0184a 2022-08-08 ct_chen 2 years ago
scpmisc.h beefd0184a 2022-08-08 ct_chen 2 years ago
service.h beefd0184a 2022-08-08 ct_chen 2 years ago
session.h beefd0184a 2022-08-08 ct_chen 2 years ago
signkey.c beefd0184a 2022-08-08 ct_chen 2 years ago
signkey.h beefd0184a 2022-08-08 ct_chen 2 years ago
ssh.h beefd0184a 2022-08-08 ct_chen 2 years ago
sshpty.c beefd0184a 2022-08-08 ct_chen 2 years ago
sshpty.h beefd0184a 2022-08-08 ct_chen 2 years ago
svr-agentfwd.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-auth.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-authpam.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-authpasswd.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-authpubkey.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-authpubkeyoptions.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-chansession.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-kex.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-main.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-runopts.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-service.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-session.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-tcpfwd.c beefd0184a 2022-08-08 ct_chen 2 years ago
svr-x11fwd.c beefd0184a 2022-08-08 ct_chen 2 years ago
sysoptions.h beefd0184a 2022-08-08 ct_chen 2 years ago
tcp-accept.c beefd0184a 2022-08-08 ct_chen 2 years ago
tcpfwd.h beefd0184a 2022-08-08 ct_chen 2 years ago
termcodes.c beefd0184a 2022-08-08 ct_chen 2 years ago
termcodes.h beefd0184a 2022-08-08 ct_chen 2 years ago
x11fwd.h beefd0184a 2022-08-08 ct_chen 2 years ago

README

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

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.