Page 24 of 26
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Thu Jan 07, 2016 8:40 pm
by m2tk
zoelechat wrote:Why don't you simply get samyext4.img from
there ?
Telnet/ssh/etc fix is already included.
I have taken it from there already.
/mnt/etc/init.d/01_02_telnet.init does not contain modification described here for F series.
My TV is UE40F6400 so MST one. This is too simple to make any errors.
1. Replace dropbearmulti
2. Replace 2 lines of code in 01_02_telnet.init
3. Remove /mtd_rwarea/passwd
4. Delete dropbear and make symlinks to new one.
OK, going to try it once again from scratch.
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Thu Jan 07, 2016 8:49 pm
by zoelechat
m2tk wrote:/mnt/etc/init.d/01_02_telnet.init does not contain modification described here for F series.
No idea, but it does include ssh and full Telnet, no point in applying fix to already fixed stuff

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Thu Jan 07, 2016 8:56 pm
by m2tk
Colors, bash history etc?
Can SSH on port 22 with putty?
Shouldn't I get something like
root@tv: instead of
VDLinux#>?
I can SSH from TV to my router, but not the other way "Connection refused".
I have history and colours in telnet. Is that all or should I be able to connect SSH to TV?
I have seen that someone have this in his 01_02_telnet.init
Code: Select all
Automatic mount of /dev/pts
/bin/mount -o bind /mtd_rwarea/passwd /etc/passwd
/bin/mount -o bind /mtd_rwarea/profile /etc/profile
/bin/mount -o bind /mnt/bin/sh /bin/sh
sync; sleep 2
There is no such in the procedure.
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Thu Jan 07, 2016 9:18 pm
by kartu
Rooted ES series Skype way.
Followed the instructions in this thread, but it didn't quite work.
Telnet was there, but it was a wrong one.
PS revealed there is "samygo_telnetd" running. Killing it before starting telnetd with new busybox worked.
So a dumb question: what does start samygo_telnetd? (I don't see any mention of it in init.d scripts)
I have oscam running, it takes about 70 sec to start, so I want to remove all unnecessary stuff from the startup. =/
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Thu Jan 07, 2016 9:27 pm
by zoelechat
m2tk wrote:Colors, bash history etc?
Can SSH on port 22 with putty?
Shouldn't I get something like root@tv: instead of VDLinux#>?
I can SSH from TV to my router, but not the other way "Connection refused".
I have history and colours in telnet. Is that all or should I be able to connect SSH to TV?
Well, img is obviously older than I thought, probably not fixed then, I thought sectroyer did so
kartu wrote:PS revealed there is "samygo_telnetd" running. Killing it before starting telnetd with new busybox worked.
So a dumb question: what does start samygo_telnetd? (I don't see any mention of it in init.d scripts)
samygo_telnetd is supposed to be some "safety" Telnet, normally launched on port 2023, if it's on 23 it's bad, and true that some SamyGO-E version included this mistake

Anyway it doesn't take long to start, you should more focus on early startup scripts, or launch oscam just after catch_crap.
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Tue Jan 19, 2016 11:17 pm
by kartu
zoelechat wrote:
kartu wrote:PS revealed there is "samygo_telnetd" running. Killing it before starting telnetd with new busybox worked.
So a dumb question: what does start samygo_telnetd? (I don't see any mention of it in init.d scripts)
samygo_telnetd is supposed to be some "safety" Telnet, normally launched on port 2023, if it's on 23 it's bad, and true that some SamyGO-E version included this mistake

Anyway it doesn't take long to start, you should more focus on early startup scripts, or launch oscam just after catch_crap.
Thanks.
It's just, I don't even see any mention of it in init.d scripts that puzzles me.
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Thu Mar 10, 2016 7:07 pm
by webber33
Hi Guys,
i need your help. I tried to fix shh on my f-series. But it doesnt work. Sometimes the Tv reboots after 3-4 minutes.
Telnet does'nt work anymore. connection refused.
SSH is working, put permission denied with pass "SamyGO"
cat 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
/bin/mount -o bind /mtd_rwarea/passwd /etc/passwd
/bin/mount -o bind /mtd_rwarea/profile /etc/profile
/bin/mount -o bind /mnt/bin/sh /bin/sh
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
cat /etc/passwd
cat /mtd_rwarea/passwd
Code: Select all
root:saJvQKUdIxRW2:0:0:SamyGO secured Root::/bin/sh
$home is empty
Thanks in advance.
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Thu Mar 10, 2016 11:55 pm
by sectroyer
mount -o bind /mtd_rwarea/passwd /etc/passwd
you missed this one

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Sat Mar 12, 2016 11:59 am
by webber33
Hi sectroyer,
/bin/mount -o bind /mtd_rwarea/passwd /etc/passwd
was in the init script. What ca i do? Is there a newer script that i can use?
Thanks.
Code: Select all
#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
/bin/mount -o bind /mtd_rwarea/passwd /etc/passwd
/bin/mount -o bind /mtd_rwarea/profile /etc/profile
/bin/mount -o bind /mnt/bin/sh /bin/sh
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
Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series
Posted: Sat Mar 12, 2016 1:23 pm
by sectroyer
Well NOT works

You need to fix that. Without it won't work. You can try running manually and see what's the output
