<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Hello<BR>
&nbsp;<BR>
&nbsp;<BR>
I am trying to compile dropbrear statically:<BR>
&nbsp;<BR>
1)  configure<BR>
LDFLAGS="-L/opt/nfs/vmic7750/usr/lib/ -L/opt/nfs/vmic7750/lib/"&nbsp; ./configure --prefix=/opt/nfs/vmic7750/usr&nbsp; --with-zlib=/opt/nfs/vmic7750/usr/lib/<BR>
&nbsp;<BR>
2)  STATIC=1 LDFLAGS="-L/opt/nfs/vmic7750/usr/lib/ -L/opt/nfs/vmic7750/lib/"&nbsp;&nbsp; make PROGRAMS="dropbear dropbearkey scp"<BR>
This results in an error: <BR>
&nbsp;<BR>
gcc -L/opt/nfs/vmic7750/usr/lib/ -L/opt/nfs/vmic7750/usr/lib/ -L/opt/nfs/vmic7750/lib/ -static -o dropbear dbutil.o buffer.o dss.o bignum.o signkey.o rsa.o random.o queue.o atomicio.o compat.o&nbsp; fake-rfc2553.o&nbsp; common-session.o packet.o common-algo.o common-kex.o common-channel.o common-chansession.o termcodes.o loginrec.o tcp-accept.o listener.o process-packet.o common-runopts.o circbuffer.o -lcrypt svr-kex.o svr-algo.o svr-auth.o sshpty.o svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o svr-tcpfwd.o svr-authpam.o&nbsp; libtomcrypt/libtomcrypt.a libtommath/libtommath.a -lutil -lz<BR>svr-chansession.o: In function `execchild':<BR>svr-chansession.c:(.text+0x4b8): warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<BR>sshpty.o: In function `pty_setowner':<BR>sshpty.c:(.text+0x18): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<BR>common-session.o: In function `fill_passwd':<BR>common-session.c:(.text+0x9f): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<BR>dbutil.o: In function `connect_remote':<BR>dbutil.c:(.text+0x96f): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<BR>svr-authpasswd.o: In function `svr_auth_password':<BR>svr-authpasswd.c:(.text+0x16): warning: Using 'getspnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<BR>svr-authpasswd.c:(.text+0x70): undefined reference to `crypt'<BR>collect2: ld returned 1 exit status<BR>make: *** [dropbear] Error 1<BR>
&nbsp;<BR>
&nbsp;<BR>
3) Next attempt: add LIBS="-lcrypt"<BR>
STATIC=1 LDFLAGS="-L/opt/nfs/vmic7750/usr/lib/ -L/opt/nfs/vmic7750/lib/" LIBS="-lcrypt"&nbsp; make PROGRAMS="dropbear dropbearkey scp"<BR>
&nbsp;<BR>
This links with a couple of warnings: Most noticable one:<BR>
<BR>gcc -L/opt/nfs/vmic7750/usr/lib/ -L/opt/nfs/vmic7750/usr/lib/ -L/opt/nfs/vmic7750/lib/ -static -o scp scp.o progressmeter.o atomicio.o scpmisc.o compat.o<BR>scp.o: In function `main':<BR>scp.c:(.text+0x2092): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<BR>
&nbsp;<BR>
4) dropbearkey&nbsp;is not portable <BR>
dropbearkey -t rsa -f /opt/nfs/vmic7750/etc/dropbear/dropbear_rsa_host_key works on the machine on which I compiled it.<BR>
&nbsp;<BR>
On another machine, it however does not start. Error message is this: <BR>
dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key<BR>
dropbearkey: /lib/libc.so.6: version `GLIBC_2.7' not found (required by dropbear)<BR>
&nbsp;<BR>
I guess this is related to different libc's, i.e. the machine that compiled dropbear probably uses an newer version than the one executing it. Unfortunatelly, I do not get libc compiled. And I also wonder a bit, because I hoped to avoid mismatches like this by statically linking. <BR>
&nbsp;<BR>
5) I created dropbear_[rsa|dss]_host_key&nbsp; on the build machine, and copied to the machine on which I want to run dropbear. /usr/sbin/dropbear starts up fine. A root login is refused however:<BR>
&nbsp;<BR>
ssh <A href="mailto:root@192.168.1.40">root@192.168.1.40</A><BR>
....<BR>
The authenticity of host '192.168.1.40 (192.168.1.40)' can't be established.<BR>
....<BR>
Warning: Permanently added '192.168.1.40' (RSA) to the list of known hosts.<BR><A href="mailto:root@192.168.1.40's">root@192.168.1.40's</A> password:<BR>Permission denied, please try again.<BR>
...<BR>
&nbsp;<BR>
Apparantly, dropbear does not know user root -- I wonder why however (root is defined in /etc/passwd) :<BR>
&nbsp;<BR>
Oct 16 17:01:30 192.168.1.40 dropbear[867]: Child connection from 192.168.1.59:44549<BR>Oct 16 17:01:31 192.168.1.40 dropbear[867]: Login attempt for nonexistent user from 192.168.1.59:44549<BR>Oct 16 17:01:32 192.168.1.40 dropbear[867]: Login attempt for nonexistent user from 192.168.1.59:44549<BR>Oct 16 17:01:33 192.168.1.40 dropbear[867]: Login attempt for nonexistent user from 192.168.1.59:44549<BR>Oct 16 17:01:34 192.168.1.40 dropbear[867]: Login attempt for nonexistent user from 192.168.1.59:44549<BR>Oct 16 17:01:35 192.168.1.40 dropbear[867]: Exit before auth: Error writing<BR><BR>
Help is certainly apprecitated .-)<BR>
&nbsp;<BR>
Thanks<BR>
&nbsp;<BR>
Tilman<BR>
&nbsp;<BR>
Thanks<BR>
&nbsp;<BR>
Tilman<BR>
<BR>&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>                                               </div></body>
</html>