comparison INSTALL @ 4:fe6bca95afa7

Makefile.in contains updated files required
author Matt Johnston <matt@ucc.asn.au>
date Tue, 01 Jun 2004 02:46:09 +0000
parents
children 59d16db56e9f
comparison
equal deleted inserted replaced
-1:000000000000 4:fe6bca95afa7
1 Basic Dropbear build instructions:
2
3 - First, edit options.h to choose user-defined features to choose, such as
4 which ciphers/hashes you want, which forwarding you want, etc.
5
6 - Edit debug.h if you want any debug options
7
8 - Now configure Dropbear's host-specific options
9 (if you are using a cvs copy, "autoconf; autoheader" first)
10
11 ./configure (optionally with --disable-zlib or --disable-syslog,
12 or --help for other options)
13
14 - Then compile and optionally install Dropbear:
15
16 (the Makefile requires GNU make, if you want to make it portable, send me
17 some patches)
18
19 make
20 make install (installs to /usr/local/sbin, /usr/local/bin by default)
21
22 You need to generate server keys, this is one-off:
23 ./dropbearkey -t rsa -f dropbear_rsa_host_key
24 ./dropbearkey -t dss -f dropbear_dss_host_key
25
26 or alternatively convert OpenSSH keys to Dropbear:
27 ./dropbearconvert openssh dropbear /etc/ssh/ssh_host_dsa_key dropbear_dss_host_key
28
29 And you can now run the server.
30 ./dropbear
31
32 or './dropbear -h' to get options.
33
34 If the server is run as non-root, you most likely won't be able to allocate a
35 pty, and you cannot login as any user other than that running the daemon
36 (obviously). Shadow passwords will also be unusable as non-root.
37
38 The Dropbear distribution includes a standalone version of OpenSSH's scp
39 program. You can compile it with "make scp", you may want to change the path
40 of the ssh binary, specified near the top of the scp.c file. By default
41 the progress meter isn't compiled in to save space, you can enable it with
42 "make scp-progress".
43
44 ============================================================================
45
46 Compiling with uClibc:
47
48 Firstly, make sure you have at least uclibc 0.9.17, as getusershell() in prior
49 versions is broken. Also note that you may get strange issues if your uClibc
50 headers don't match the library you are running with, ie the headers might
51 say that shadow password support exists, but the libraries don't have it.
52
53 To compile for uClibc the following should work:
54
55 rm config.cache
56 CC=i386-uclib-gcc ./configure --disable-zlib
57 make clean
58 make
59 make strip
60
61 ... and that should be it. You can use "make static" to make statically linked
62 binaries, and it is advisable to strip the binaries too. If you're looking
63 to make a small binary, you should remove unneeded ciphers and MD5, by
64 editing options.h
65
66 It is possible to compile zlib in, by copying zlib.h and zconf.h into a
67 subdirectory (ie zlibincludes), and
68
69 export CFLAGS="-Izlibincludes -I../zlibincludes"
70 export LDFLAGS=/usr/lib/libz.a
71
72 before ./configure and make.
73
74 If you disable zlib, you must explicitly disable compression for the client -
75 OpenSSH is possibly buggy in this regard, it seems you need to disable it
76 globally in ~/.ssh/config, not just in the host entry in that file.
77
78 You may want to manually disable lastlog recording when using uClibc, configure
79 with --disable-lastlog.
80
81 One common problem is pty allocation. There are a number of types of pty allocation which can be used -- if they work properly, the end result is the same for each type. Running configure should detect the best type to use automatically, however for some embedded systems, this may be incorrect. Some things to note:
82
83 If your system expects /dev/pts to be mounted (this is a uClibc option),
84 make sure that it is.
85
86 Make sure that your libc headers match the library version you are using.
87
88 If openpty() is being used (HAVE_OPENPTY defined in config.h) and it fails,
89 you can try compiling with --disable-openpty. You will probably then need
90 to create all the /dev/pty?? and /dev/tty?? devices, which can be
91 problematic for devfs. In general, openpty() is the best way to allocate
92 PTYs, so it's best to try and get it working.
93
94
95 ============================================================================
96
97 Public key auth:
98
99 You can use ~/.ssh/authorized_keys in the same way as with OpenSSH, just put
100 the key entries in that file. They should be of the form:
101
102 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwVa6M6cGVmUcLl2cFzkxEoJd06Ub4bVDsYrWvXhvUV+ZAM9uGuewZBDoAqNKJxoIn0Hyd0Nk/yU99UVv6NWV/5YSHtnf35LKds56j7cuzoQpFIdjNwdxAN0PCET/MG8qyskG/2IE2DPNIaJ3Wy+Ws4IZEgdJgPlTYUBWWtCWOGc= someone@hostname
103
104 You must make sure that ~/.ssh, and the key file, are only writable by the
105 user.
106
107 NOTE: Dropbear ignores authorized_keys options such as those described in the
108 OpenSSH sshd manpage, and will not allow a login for these keys.