1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-10-31 20:40:22 +00:00
simplesshd/dropbear
2014-12-16 17:27:43 -05:00
..
debian stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
libtomcrypt somehow #define LTC_SOURCE 1 (which should really be in all libtomcrypt 2014-12-14 16:43:39 -05:00
libtommath stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
.hg_archival.txt stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
.hgsigs stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
.hgtags stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
.travis.yml stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
agentfwd.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
algo.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
atomicio.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
atomicio.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
auth.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
bignum.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
bignum.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
buffer.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
buffer.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
CHANGES stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
channel.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
chansession.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
circbuffer.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
circbuffer.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-agentfwd.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-auth.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-authinteract.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-authpasswd.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-authpubkey.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-channel.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-chansession.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-kex.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-main.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-runopts.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-session.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
cli-tcpfwd.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
common-algo.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
common-channel.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
common-chansession.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
common-kex.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
common-runopts.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
common-session.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
compat.c fix bug in dropbear - returning address of local variable!! 2014-12-14 08:29:27 -05:00
compat.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
config.guess stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
config.h.in stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
config.sub stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
configure stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
configure.ac stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
crypto_desc.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
crypto_desc.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
curve25519-donna.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dbclient.1 stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dbmulti.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dbrandom.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dbrandom.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dbutil.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dbutil.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
debug.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dropbear.8 stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dropbearconvert.1 stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dropbearconvert.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dropbearkey.1 stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dropbearkey.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dss.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
dss.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ecc.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ecc.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ecdsa.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ecdsa.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
fake-rfc2553.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
fake-rfc2553.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
filelist.txt stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
gendss.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
gendss.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
genrsa.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
genrsa.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
gensignkey.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
gensignkey.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
includes.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
INSTALL stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
install-sh stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
kex.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
keyimport.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
keyimport.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
LICENSE stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
list.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
list.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
listener.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
listener.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
loginrec.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
loginrec.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ltc_prng.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ltc_prng.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
Makefile.in stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
MULTI stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
options.h add conf_path_file() function to generate "/sdcard/ssh/foo" style filenames 2014-12-16 17:27:43 -05:00
packet.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
packet.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
process-packet.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
progressmeter.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
progressmeter.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
queue.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
queue.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
README stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
release.sh stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
rsa.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
rsa.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
runopts.h get rid of pid file 2014-12-14 15:54:21 -05:00
scp.c use S_IWUSR (0200) instead of S_IWRITE (S_IWRITE isn't documented, i 2014-12-14 08:41:22 -05:00
scpmisc.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
scpmisc.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
service.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
session.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
signkey.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
signkey.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
SMALL stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
ssh.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
sshpty.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
sshpty.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-agentfwd.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-auth.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-authpam.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-authpasswd.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-authpubkey.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-authpubkeyoptions.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-chansession.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-kex.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-main.c get rid of pid file 2014-12-14 15:54:21 -05:00
svr-runopts.c get rid of pid file 2014-12-14 15:54:21 -05:00
svr-service.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-session.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-tcpfwd.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
svr-x11fwd.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
sysoptions.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
tcp-accept.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
tcpfwd.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
termcodes.c stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
termcodes.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
TODO stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00
x11fwd.h stock dropbear-2014.66 source tree 2014-12-10 16:56:49 -05:00

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 <hostname>

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.