DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-05-30 18:00:43

iSteve
New member
Registered: 2009-05-30
Posts: 4

sshd in current fun_plug 0.5 tarball broken?

Hello everybody

I just installed fun_plug 0.5 and enabled sshd.

When trying to ssh into the machine as root, it asks for the password and displays the hello message of Busybox's shell. But there is no # prompt. I can type what I want, it gets echoed, but no command is executed.

Looks like that:

$ssh root@nas
root@nas's password:


BusyBox v1.00-pre1 (2008.09.02-11:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

ls
hmm ... this is strange
^C
Connection to nas closed.

Running ps from a telnet shell while having the ssh connection established looks like that:

1911 root     /ffp/sbin/sshd
2184 root     sshd: root@pts/2
2190 root     -sh
2196 root     ps

I assume that the "-sh" process is the shell started by sshd. It goes away when I end the ssh connection (together with the second sshd instance).

What is wrong here? I already went through

funpkg -u openssh-5.2p1-2.tgz
funpkg -I openssh-5.2p1-2.tgz

but this did not help.

Please help!

The DNS-323 has firmware version 1.06, if that matters.

Offline

 

#2 2009-05-30 21:05:20

iSteve
New member
Registered: 2009-05-30
Posts: 4

Re: sshd in current fun_plug 0.5 tarball broken?

Here is some more information on this. Typing /bin/sh in the telnet shell shows the same problem: The welcome message of Busybox's ash is printed and I can type whatever I want, it just gets echoed but not executed.

Issuing the command

chsh -s /ffp/bin/sh

in the telnet shell fixes the problem: Now I can login via ssh and the shell works fine.

OK, I can put the chsh command into /ffp/start/sshd.sh. But I feel that this is not the way it was intended.

Offline

 

#3 2009-05-30 21:10:47

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Offline

 

#4 2009-05-31 12:15:52

iSteve
New member
Registered: 2009-05-30
Posts: 4

Re: sshd in current fun_plug 0.5 tarball broken?

Yes, now it works (with chsh).

IMO it's just worth pointing out that the telnet access works straight out of the box (without chsh) whereas the ssh access requires it.

So telnetd seems to have some built-in magic to run /ffp/bin/sh even if root's default shell is /bin/sh, but sshd hasn't.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB