Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.

bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by bobiturboto »

sectroyer wrote:Okay for some reason it doesn't like /mnt/bin/sh... Change this:

Code: Select all

            if [ ! -e /mtd_rwarea/passwd ]; then
                    echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$HOME:/mnt/bin/sh" > /mtd_rwarea/passwd
            fi
To this:

Code: Select all

         if [ ! -e /mtd_rwarea/passwd ]; then
                    echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$HOME:/bin/sh" > /mtd_rwarea/passwd
            fi
Then this:

Code: Select all

umount /mtd_rwarea/passwd
rm /mtd_rwarea/passwd
reboot tv and this:

Code: Select all

cat /etc/passwd

Code: Select all

root@tv:/mnt # cat /mtd_rwarea/passwd
root:saJvQKUdIxRW2:0:0:SamyGO secured Root:/mnt/:/bin/sh
Now I have ssh access but no sftp.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by sectroyer »

bobiturboto wrote:
Now I have ssh access but no sftp.
I did not allow you to test sftp :P First you need to make scp work. On your computer run this command:

Code: Select all

ssh root@ip_of_your_TV "set"
and:

Code: Select all

echo 1 > /tmp/test.txt
scp /tmp/test.txt root@ip_of_your_TV:/tmp/
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by bobiturboto »

sectroyer wrote:
bobiturboto wrote:
Now I have ssh access but no sftp.
I did not allow you to test sftp :P First you need to make scp work. On your computer run this command:

Code: Select all

ssh root@ip_of_your_TV "set"
and:

Code: Select all

echo 1 > /tmp/test.txt
[code]scp /tmp/test.txt root@ip_of_your_TV:/tmp/
[/quote]

Code: Select all

users-MacBook:~ user$ ssh root@192.168.0.101 "set"
root@192.168.0.101's password: 
HOME='/mnt/'
IFS=' 	
'
LOGNAME='root'
OPTIND='1'
PATH='/dtv/bin:/bin'
PPID='3118'
PS1='\w \$ '
PS2='> '
PS4='+ '
PWD='/mnt'
SHELL='/bin/sh'
SSH_CONNECTION='192.168.0.17 54217 192.168.0.101 22'
USER='root'
users-MacBook:~ user$ 

Code: Select all

users-MacBook:~ user$ scp /tmp/test.txt root@192.168.0.101:/tmp/
root@192.168.0.101's password: 
sh: scp: not found
lost connection
Last edited by bobiturboto on Sun Jun 22, 2014 5:17 pm, edited 1 time in total.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by sectroyer »

okay one final touch. in the telnet init script right before this:

Code: Select all

   if [ ! -e /mtd_rwarea/passwd ]; then
                    echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$HOME:/bin/sh" > /mtd_rwarea/passwd
            fi
put this:

Code: Select all

ln -s /mnt/bin/ /dtv/bin
reboot tv and run this on your computer:

Code: Select all

scp /tmp/test.txt root@ip_of_your_TV:/tmp/
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by bobiturboto »

Code: Select all

users-MacBook:~ user$ scp /tmp/test.txt root@192.168.0.101:/tmp/
root@192.168.0.101's password: 
test.txt                                                                         100%    2     0.0KB/s   00:00    
users-MacBook:~ user$ 
Works :roll:
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by sectroyer »

bobiturboto wrote:

Code: Select all

users-MacBook:~ user$ scp /tmp/test.txt root@192.168.0.101:/tmp/
root@192.168.0.101's password: 
test.txt                                                                         100%    2     0.0KB/s   00:00    
users-MacBook:~ user$ 
Works :roll:
now you can check the other way on tv try to ssh/scp to your computer :) Also you should be able to use your sftp now :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by bobiturboto »

Yes it's works in opposite direction too.

Code: Select all

root@tv:/mnt $ scp /tmp/test.txt turbo@192.168.0.12:/tmp/
turbo@192.168.0.12's password: 
test.txt                                                                         100%    2     0.0KB/s   00:00    
root@tv:/mnt $
sftp doesn't work but I think we need extra packages http://linuxexplore.com/how-tos/sftp-se ... -dropbear/

Thank you very much about your help, great work.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by sectroyer »

I think with this changes sftp worked for me on E... Let's test it more carefully run this:

Code: Select all

/bin/ps | grep dropbear
killall -KILL dropbear
/bin/ps | grep dropbear
dropbear -F -E
and then try to use sftp in other terminal window. BTW why do you want to use sftp if you have ftp and scp ? :D
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by bobiturboto »

sectroyer wrote:I think with this changes sftp worked for me on E... Let's test it more carefully run this:

Code: Select all

/bin/ps | grep dropbear
killall -KILL dropbear
/bin/ps | grep dropbear
dropbear -F -E
and then try to use sftp in other terminal window. BTW why do you want to use sftp if you have ftp and scp ? :D
It's sftp very good if you want to connect securely from outside if you using windows workstation + filezilla for example.
I am sure that nobody will keep the tv powered all of the time, but for emergency purposes, why not.
It's not mandatory but is good to have it.

Code: Select all

root@tv:/mnt # /bin/ps | grep dropbear
 1814 root       0:00 dropbear
 3419 root       0:00 grep dropbear
root@tv:/mnt # killall -KILL dropbear
root@tv:/mnt # /bin/ps | grep dropbear
 3439 root       0:00 grep dropbear

Code: Select all

Status:	Connecting to 192.168.0.101...
Response:	fzSftp started
Command:	open "root@192.168.0.101" 22
Command:	Pass: ******
Status:	Connected to 192.168.0.101
Error:	Connection closed by server with exitcode 127
Error:	Could not connect to server

Code: Select all

root@tv:/mnt # dropbear -F -E
[3466] Jun 22 17:03:12 Failed reading '/etc/dropbear/dropbear_dss_host_key', disabling DSS
[3466] Jun 22 17:03:12 Not backgrounding
[3504] Jun 22 17:04:28 Child connection from 192.168.0.17:54898
[3504] Jun 22 17:04:28 Password auth succeeded for 'root' from 192.168.0.17:54898
[3504] Jun 22 17:04:28 Exit (root): Exited normally
[3512] Jun 22 17:04:33 Child connection from 192.168.0.17:54899
[3512] Jun 22 17:04:34 Password auth succeeded for 'root' from 192.168.0.17:54899
[3512] Jun 22 17:04:34 Exit (root): Exited normally
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Post by sectroyer »

On dropbear side everything works to get sftp working you need to install another packages. I am not interested in investigating it any further. SFTP IS NOT PART of dropbrea. This is NOT a bug :) You can use mc/winscp/etc or any other application that supports SCP protocol :) There three protocols: SCP, SFTP and FTPS. Everyone is different and dropbear (ergo SamyGO ) supports only SCP :)

BTW it would be great if you could summarize all the changes that we have made and prepare a tutorial for F users :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

Post Reply

Return to “[F] Software”