www.usr.com/support/gpl/USR9107_release.1.4.tar.gz
[bcm963xx.git] / userapps / opensource / sshd / README
index bb8b6b8..43dd1f2 100755 (executable)
@@ -1,94 +1,74 @@
-This is Dropbear, a smallish SSH 2 server.
+This is Dropbear, a smallish SSH 2 server and client.
 
-It is fairly stable, though hasn't had extensive testing, so if you want to use
-it somewhere important, test it first. I'd appreciate if you let me know about
-any bugs you find.
+INSTALL has compilation instructions.
 
-See TODO for a few of the things I know need looking at.
+MULTI has instructions on making a multi-purpose binary (ie a single binary
+which performs multiple tasks, to save disk space)
 
-matt@ucc.asn.au
-
-============================================================================
+SMALL has some tips on creating small binaries.
 
-Basic build instructions:
+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 :)
 
-(if you're using it from CVS, you need to automake; autoconf)
-
-- Edit options.h to choose features to include
-- Edit debug.h if you want any debug options
+Matt Johnston
+matt@ucc.asn.au
 
-./configure      (optionally with --disable-zlib or --disable-syslog,
-                  or --help for other options)
-make
-make install     (installs to /usr/local/sbin, /usr/local/bin by default)
 
-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
+In the absence of detailed documentation, some notes follow:
+============================================================================
 
-or alternatively convert OpenSSH keys to Dropbear:
-./dropbearconvert openssh dropbear /etc/ssh/ssh_host_dsa_key dropbear_dss_host_key
+Server public key auth:
 
-And you can now run the server.
-./dropbear
+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:
 
-or './dropbear -h' to get options.
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwVa6M6cGVmUcLl2cFzkxEoJd06Ub4bVDsYrWvXhvUV+ZAM9uGuewZBDoAqNKJxoIn0Hyd0Nk/yU99UVv6NWV/5YSHtnf35LKds56j7cuzoQpFIdjNwdxAN0PCET/MG8qyskG/2IE2DPNIaJ3Wy+Ws4IZEgdJgPlTYUBWWtCWOGc= someone@hostname
 
-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.
+You must make sure that ~/.ssh, and the key file, are only writable by the
+user.
 
-You can use scp with dropbear, you'll just need to put scp from OpenSSH (or
-equivalent) in your path (/usr/bin/scp etc). In a future release Dropbear
-will include a scp program.
+NOTE: Dropbear ignores authorized_keys options such as those described in the
+OpenSSH sshd manpage, and will not allow a login for these keys. 
 
 ============================================================================
 
-Compiling with uclibc:
+Client public key auth:
 
-Firstly, make sure you have at least uclibc 0.9.17, as getusershell() in prior
-versions is horribly broken.
+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.
 
-Dropbear should compile fine with uclibc, just do the following (works for
-bash style shells, others might differ):
+If you have an OpenSSH-style private key ~/.ssh/id_rsa, you need to do:
 
-export CC=i386-uclibc-gcc
-rm config.cache
-./configure --disable-zlib
-cd libtomcrypt; make clean; make
-cd ..; make clean; make
+dropbearconvert openssh dropbear ~/.ssh/id_rsa  ~/.ssh/id_rsa.db
+dbclient -i ~/.ssh/id_rsa.db <hostname>
 
-... and that should be it. You can use "make static" to make statically linked 
-binaries, and it is advisable to strip the binaries too. If you're looking
-to make a small binary, you should remove unneeded ciphers and md5, by 
-editing options.h
+Currently encrypted keys aren't supported, neither is agent forwarding. At some
+stage both hopefully will be.
 
-It is possible to compile zlib in, by copying zlib.h and zconf.h into a
-subdirectory (ie zlibincludes), and 
+============================================================================
 
-export CFLAGS="-Izlibincludes -I../zlibincludes"
-export LDFLAGS=/usr/lib/libz.a
+If you want to get the public-key portion of a Dropbear private key, look at
+dropbearkey's '-y' option.
 
-before ./configure and make.
+============================================================================
 
-If you disable zlib, you must explicitly disable compression for the client -
-OpenSSH is possibly buggy in this regard, it seems you need to disable it
-globally in ~/.ssh/config, not just in the host entry in that file.
+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
 
-You may want to manually disable lastlog recording when using uClibc, configure
-with --disable-lastlog
+or alternatively convert OpenSSH keys to Dropbear:
+./dropbearconvert openssh dropbear /etc/ssh/ssh_host_dsa_key dropbear_dss_host_key
 
 ============================================================================
 
-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
+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.
 
-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. 
+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.