Page 26 of 26
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Fri Apr 01, 2016 7:16 pm
by OlliGo
I read carefully through the thread, but a final solution for D was never posted. Last quote was from juusso:
yes, i saw these files on server, they slightly differ from files you`ve attached here

I haven`t succeed to merge your full patch with my Extensions, somewhere i still make mistakes. As result - still no benefits you mentioned. Yet.
We could merge all for each series, so no need to distribute separate fixes. Just re-install whole widget.
He doesn't stated which changes he did. So far I don't see where /dtv/network_opt needs to be mapped to. Also rcfix_telnetd cannot work as there is no telnetd on the D. And finally I don't see any line that would start the dropbear demon. As I have done that manually result was already discussed.
@All: Anyone who has it working on D and could provide more concrete steps for it?
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Fri Apr 01, 2016 11:03 pm
by sectroyer
1) No point in "starting dropbear demon" - Will NOT work until other stuff fixed

2) You should read all stuff and adjust it to your series. That's mine thing

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Sat Nov 19, 2016 10:08 am
by ZizaXXX
Hello Gents,
I have UE46F8000 rooted with no problems. FTP and all apps working, however I cannot get telnet and SSH correctly working. Followed all instructions for F series in third post. Telnet is working with colours, but no executing history (i.e. if injecting, does not display "injecting...". SSH is not working at all with "CONNECTION REFUSED".
01_02_telnet.init:
Code: Select all
#!/mnt/bin/busybox sh
#
# ? Copyright 1996-2013, SamyGO
#
#
. /dtv/SGO.env
stop_bootloop()
{
# emergency skript exit to prevent boot loop
for USB in ${1:- \
/dtv/usb/sd* } ; do
echo "checking $USB"
sleep 1
if [ -e $USB/STOP_TELNET ]; then
"STOP_TELNET found. Script exit..."
exit 1
fi
done
}
case $1 in
start)
stop_bootloop # in testing phase. Just for protection.
#antishell, mount, console unlock, authuld exception, printk restrictions:
insmod $MOD_DIR/kernel/drivers/pty/SRS_module.ko >> $LOGFILE 2>&1
sync; sleep 1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "lsmod after insmod SRS_module.ko:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
lsmod >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
#modules with dynamic addressing by bugficks:
insmod $MOD_DIR/kernel/drivers/pty/ptys.ko >> $LOGFILE 2>&1 # alternative to pty.ko and devpts.ko from bugficks. Automatic mount of /dev/pts
sync; sleep 2
# true telnet
echo "export PS1='root@tv:\w \$ '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
echo "PS1='root@tv:\w \$ '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
/bin/mount -o bind "$SYSROOT/bin/sh" /bin/sh
export HOME=/mnt/
export PS1='root@tv:\w \$ '
$SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/sh & >> $LOGFILE 2>&1
sync
#### E/F series: bind option is prohibited, you have to load proper mount.ko to use mount --bind.
#mount our profile over original /etc/profile if mount.ko is loaded and mount issue fixed:
$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/profile /etc/profile || echo "can not mount profile!" && dmesg | tail >> $LOGFILE 2>&1
# mount our passwd file over original one (/bin/sh changed to /mnt/bin/sh )
ln -s /mnt/bin/ /dtv/bin
if [ ! -e /mtd_rwarea/passwd ]; then
echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$HOME:/bin/sh" > /mtd_rwarea/passwd
fi
$SYSROOT/bin/busybox mount -o bind /mtd_rwarea/passwd /etc/passwd || echo "can not mount passwd" && dmesg | tail >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "checking mount --bind:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
$SYSROOT/bin/busybox mount | grep "etc" >> $LOGFILE 2>&1
echo " " >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
echo "dmesg -c:" >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
dmesg -c >> $LOGFILE 2>&1
echo "++++++++++++++++++++++++++++++++++" >> $LOGFILE 2>&1
;;
stop)
;;
status)
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
I am not an expert, so in case of support, can you please kindly post codes if you need me to do anything?
Many thanks in advance for your help.
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Fri Jun 21, 2024 6:47 am
by beatfreak
and why is this tread not pinned? imho this is an essential part of system hardening for a rooted TV (given that telnet access will also be password protected or disabled as soon as ssh works) along with setting a password for ftp