|
Hi all I have some error when i connect dropbear arise
<Environment>
1. Target : uClinux-2.4.x (ARM)
2. /etc/passwd
-------------------------------------------------------------------------------------------------------------- root:$1$$I2o9Z7NcvQAKp7wyCTlia0:0:0:root:/: passwd $1$$I2o9Z7NcvQAKp7wyCTlia0 enable $1$$I2o9Z7NcvQAKp7wyCTlia0 -------------------------------------------------------------------------------------------------------------------
3. This Massage shows when dropbear is running
--------------------------------------------------------------------------------------------------------------------------------- /var> ps -ef
PID TTY Uid Size State Command 1 root 0 S init 2 root 0 S [keventd] 3 root 0 S [ksoftirqd_CPU0] 4 root 0 S [kswapd] 5 root 0 S [bdflush] 6 root 0 S [kupdated] 50 root 0 S [sdfe-0] 52 root 0 S [sfpcheck] 59 root 0 S [efmoam] 67 root 0 S /bin/boa 68 root 0 S /bin/snmpd 69 root 0 S /bin/logd 70 root 0 S /bin/inetd 71 root 0 S /bin/nexoamd 72 root 0 S /bin/ifgd 74 ttyS0 root 0 S /bin/sh 4532 root 0 S /bin/telnetd 4533 ttyp1 root 0 S /bin/sh 4624 ttyp1 root 0 Z [dropbear] 6476 ttyp1 root 0 D ./dropbear 6477 root 0 S ./dropbear 6587 ttyp1 root 0 R ps -ef
/var> [12487] Jan 02 16:00:22 Child connection from 172.16.0.11:60769 [12487] Jan 02 16:00:32 password auth succeeded for 'root' from 172.16.0.11:60769 [12487] Jan 02 16:00:33 exit after auth (root): chown(/dev/ttyp1, 0, 21869564) failed: Read-only file system --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4. HOST : 172.16.0.11 : I try to connect to Target with ssh but I failed ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [r...@localhost sbin]# ssh 172.16.0.33 [email protected]'s password: Read from remote host 172.16.0.33: Connection reset by peer Connection to 172.16.0.33 closed. [r...@localhost sbin]# ssh 172.16.0.33 [email protected]'s password: Read from remote host 172.16.0.33: Connection reset by peer Connection to 172.16.0.33 closed. ----------------------------------------------------------------------------------------------------------------------------------------------------------------
5. ps -ef After Login failed
------------------------------------------------------------------------------------------------------------------- /var> ps -ef PID TTY Uid Size State Command 1 root 0 S init 2 root 0 S [keventd] 3 root 0 S [ksoftirqd_CPU0] 4 root 0 S [kswapd] 5 root 0 S [bdflush] 6 root 0 S [kupdated] 50 root 0 S [sdfe-0] 52 root 0 S [sfpcheck] 59 root 0 S [efmoam] 67 root 0 S /bin/boa 68 root 0 S /bin/snmpd 69 root 0 S /bin/logd 70 root 0 S /bin/inetd 71 root 0 S /bin/nexoamd 72 root 0 S /bin/ifgd 74 ttyS0 root 0 S /bin/sh 4532 root 0 S /bin/telnetd 4533 ttyp1 root 0 S /bin/sh 4624 ttyp1 root 0 Z [dropbear] 6476 ttyp1 root 0 D ./dropbear 6477 root 0 D ./dropbear 6705 root 0 R ./dropbear 6708 root 0 S sh -c /bin/draw_gd -d 25 254 254 6709 root 0 R /bin/draw_gd -d 25 254 254 6710 ttyp1 root 0 R ps -ef ----------------------------------------------------------------------------------------------------------------------------------------------- New PID is created.
pid 6705 pid 6708 pid 6709
<Install Process>
1. ./configure --prefix=/home/proj/tango/linux/dropbear --disable-openpty --disable-zlib STATIC=1 2. make STATIC 1 3. make STATIC 1 install 4. This is Makefile ------------------------------------------------------------------------------------------------------------------------------------------------------
srcdir=.
prefix=/home/proj/tango/linux/dropbear/arm exec_prefix=${prefix} bindir=${exec_prefix}/bin sbindir=${exec_prefix}/sbin
CC=arm-elf-gcc -Wl, -elf2flt AR=arm-elf-ar RANLIB=arm-elf-ranlib STRIP=arm-elf-strip INSTALL=install CPPFLAGS=-I./uclibc-include -I/usr/local/arm-elf/include CFLAGS=-I. -I$(srcdir) -I$(srcdir)/libtomcrypt/src/headers/ $(CPPFLAGS) -Os -W -Wall LIBS=$(LTC) $(LTM) -lutil -lcrypt LDFLAGS=-L./uclibc-lib
EXEEXT=
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
5. This is sshpty.c -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if (stat(tty_name, &st)) { 379 dropbear_exit("pty_setowner: stat(%.101s) failed: %.100s", 380 tty_name, strerror(errno)); 381 } 382 383 if (st.st_uid != pw->pw_uid || st.st_gid != gid) { 384 if (chown(tty_name, pw->pw_uid, gid) < 0) { 385 if (errno == EROFS && 386 (st.st_uid == pw->pw_uid || st.st_uid == 0)) { 387 dropbear_log(LOG_ERR, 388 "chown(%.100s, %u, %u) failed: %.100s", 389 tty_name, (unsigned int)pw->pw_uid, (unsigned int)gid, 390 strerror(errno)); 391 } else { 392 dropbear_exit("chown(%.100s, %u, %u) failed: %.100s", 393 tty_name, (unsigned int)pw->pw_uid, (unsigned int)gid, 394 strerror(errno)); 395 } 396 } 397 } 398 399 if ((st.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO)) != mode) { 400 if (chmod(tty_name, mode) < 0) { 401 if (errno == EROFS && 402 (st.st_mode & (S_IRGRP | S_IROTH)) == 0) { 403 dropbear_log(LOG_ERR, 404 "chmod(%.100s, 0%o) failed: %.100s", 405 tty_name, mode, strerror(errno)); 406 } else { 407 dropbear_exit("chmod(%.100s, 0%o) failed: %.100s", 408 tty_name, mode, strerror(errno)); 409 } 410 } 411 } 412 } --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
How can i fixed the this problem?
|
- Dropbear Error Message 생각하기
- Re: Dropbear Error Message Rob Landley
