Winscp error 127

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
Whenever I log in to dreambox and try to edit files I receive the following:

Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
Command failed with return code 127.

Can someone very kindly give clear instructions on how to proceed ?
 
D

deleted

Guest
1st what dreambox model do you have
2nd what image is on the box
3rd what files are you trying to edit :confused
 

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
1. DM 7000
2. EDG Nemesis 4.4
3. any files

I have enabled dropbear 0.48 and can connect to dreambox no problem.
As soon as I try to edit, then I receive the above error message.. why ?
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
Hi @sucker69,

1. How are you accessing the files to edit them?
2. What are you using to edit them?
3. Are you editing at home (via your LAN) or from a remote location (via Internet)?

When I use windoze, I use FlashFXP (ftp program) to access my DM7000 file system & files. In FlashFXP preferences I have set UltraEdit32 as my editor. In many cases a Unix/Linux compatible editor is Essential for editing Dreambox files. Windoze Notepad and similar DOS/Windoze text editors will not do!

If you are editing over your home LAN (Ethernet cable or WiFi) then no Dropbear/SSH & SFTP will be necessary. A direct link will work fine without those running.

However, if you are editing remotely then you do need Dropbear/SSH & SFTP server. I found that Dropbear versions less than 0,51 did not support tunneling and only 0.52 came with an SFTP server. You can find these in the link below, plus how I installed and set them up on my DM7000S:
http://www.satellites.co.uk/forums/...72686-remotely-login-dreambox.html#post918566

When I'm editing files through FlashFXP, I click save, close the editor and click OK (or Yes) to the Upload message box. This procedure is the same, whether I am working directly on my LAN through Port 21 on the Dreambox or remotely through my SSH/Dropbear port over the Internet.

Hope some of this is of interest and let's know what programs you are using?

Best wishes, John.

BTW; Most of the time I use an Asus EeePC Linux Netbook. I use gFTP (instead of FlashFXP) and my system text editor (which is a full Linux programmers editor) instead of UltraEdit32. It all works very easily and very well.
 

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
John,

I noticed that when you install dropbear from blue panel in EDG image,
the file dropbearmulti is placed in /var/bin.

However your instructions refer to /sbin. What is the correct location ?

I can log in remotely to my dreambox, but still receive error message when
I try to edit any file.

Error message:
Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
Command failed with return code 127.

Please help
 

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
I can connect remotely with DM7000 using EDG 4.4 img, but whenever I edit any file
I receive the following message:

Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
Command failed with return code 127.

I hope an expert can shed some light ?
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
Hi @sucker69,

Edit: Correction; I'm wrong! SCP is implemented through dropbear_multi but I have never used it. It is called, in my Gem4.70 image, via a Symbolic Link called scp which links to the dropbear_multi binary. If the symbolic link is missing in your image then I expect the error you are getting would occur. In G470 the scp symbolic link is in the same folder as dropbear_multi. To create a symbolic link, from the prompt in a DM7000S telnet session type:
ln -s /sbin/dropbear_multi /sbin/scp [Press Enter]
(that is: LN -S but must all be lower case as shown above)
Place your scp symbolic link in whatever folder dropbear_multi is in for your image.

1. Lets get the SCP bit out of the way first. There is no SCP in the DM7000S implementation of Linux. There is oly SFTP and that is only available when you have installed the files I posted in the other thread.

Edit: OK, I realise it is WinSCP now, sorry.
I think SFTP would be better than SCP if you can configure WinSCP to use it.
2. What program are you using to access the DM7000S files?
Whatever (presumably FTP program) it is, have you configured it to use SSH/SFTP when accessing the DM7000S.


3. The correct location for the 'dropbear_multi' binary will depend on how your image starts dropbear. In Gemini4.70 it is the script file /var/script/dropbear_script.sh
which I refer to editing to change the SSH port (A MUST) and to disable Password Authentication (Another MUST). If your image uses a similar script and you have edited it as per my guide, then go back and look at the location of dropbear_multi in that file and that is where to put it.

4. Are you definitely accessing your files through an SSH port (22 if you have not yet changed it or a random high number if you have followed my guide) or are you just accessing the files directly without SSH by setting your router to forward incoming requests on port 21 (FTP) to your DM7000S LAN IP?

5. To check that dropbear is running. Access your DM7000S through a Telnet session and at the prompt type:
ps [and Press Enter]
Check that in the list of running programs you have a dropbear line of the form:
376 root 628 S /sbin/dropbear -s -g -p 22222

Hope some of this helps?

Best wishes, John.
 

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
John,

I am trying to install SFTP and need some help.

I believe that I need 2 scripts:
1. SFTP-server startup
2. SFTP-server.sh

Please be so kind as to attach the above files in question ?

Thanks
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
Hi @sucker69,

Sorry, I have no knowledge of these files!!
When I use gFTP from my Asus Netbook it calls SFTP through Dropbear.
The only script I can provide, is that used by Gemini 4.70 to start the Dropbear SSH server (which I have attached in original Gem470 form and as modified to disable password log-in and to use a non-standard port) but this is not what you have asked for. Where have you found mention of these scripts, such that you think I might have them?
In the Dreambox/Dropbear case, SFTP is launched by the Dropbear SSH server when an incoming SSH client requests it (-s sftp in the incoming request).

From the message box of gFTP, here is how it starts the SSH & SFTP sessions:

Opening SSH connection to 192.168.0.24
Running program ssh -i /home/user/.ssh/rsakey -e none -l root -p 22222 192.168.0.24 -s sftp
3: Protocol Initialization
3: Protocol version 3
Successfully logged into SSH server 192.168.0.24

The above is from starting a local SSH session rather than a remote one but other than the IP address it would be the same.
ssh in the above command string is the ssh client on the Asus Netbook.
The only parameter I have provided to gFTP is the location of the RSA Key file on the Asus Netbook:
SSH Extra Params: -i /home/user/.ssh/rsakey
(and of course the SSH port instead of 21/22)
Everything else is supplied by gFTP when I tell it to start an SSH2 session instead of an FTP session.

Although I have never used it I assumed PuTTY on a Windoze system would behave in a similar (if not simpler) way. Again, with WinSCP, does it have the ability to start SFTP on the remote machine, as gFTP does?

The version of Dropbear (0.52) in my Guide, expects sftp-server to be in Dreambox folder /libexec
I placed both dropbearmulti and sftp-server in /sbin
As it did not exist, I added a folder called /libexec
and put a symbolic link to sftp-server in that folder
ln -s /sbin/sftp-server /libexec/sftpserver
There were already symbolic links called; dropbear, dropbearkey, ssh & scp
in folder /sbin and each pointed to dropbearmulti
eg: ln -s /sbin/dropbearmulti /sbin/dropbear
etc.

Sorry I cannot help with the SFTP scripts. In the Dreambox/Dropbear case, SFTP is not running continuously like the Dropbear server but only when requested by the incoming ssh client. Perhaps some other Linux systems do things differently but the above is how it works for me with Dropbearmulti 0.52 + sftp-server on my DM7000S running Gemini 4.70 in FlashWizard Multi-boot.

I hope some of the above may be of help to you?

Best wishes, John.
 

Attachments

  • dropbear_script.zip
    773 bytes · Views: 88

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
John,

Thank you for your thorough explanation.
Now I understand how scp and sftp connect
via dropbear.

I am still struggling with updating to dropbearmulti
to version 0.52. I noticed that version 0.52 is
much smaller than 0.48.

I will try updating tonight.

Thank you for your help.
Much appreciated.
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
Hi @sucker69,

Good luck with your upgrade.
As a starting point, I would suggest:

1. Install both dropbearmulti and sftp-server in /var/bin as this seems to be where your image expects to find the dropbear binary.

2. Don't forget to change the file attributes of both programs to 755 so that they are executable.

3. If they do not already exist, create the Symbolic Links; dropbear, dropbearkey, ssh & scp also in folder /var/bin.

4. If it does not exist, create a folder /libexec
(mkdir /libexec [Enter])

5. Create a symbolic link in folder /libexec to /var/bin/sftp-server
(ln -s /var/bin/sftp-server /libexec/sftp-server [Enter])

6. If you can find the script file that launches dropbear, then edit it as per my guide or example script.

7. If your image was already starting dropbear then it should still be able to start the new binary, whether or not you have edited the launch script.
(check after reboot for a dropbear process running:
ps [Enter])

8. Try WinSCP 'as-is' without any changes to see if it works with the new dropbearmulti binary and scp symbolic link.

9. If it does not work, try adjusting the WinSCP settings to use SSH2/SFTP and try again.

10. Also check that in the profile file that you pm'd me about (/etc/profile), that /var/bin is included in the; export PATH=
line.

Let's know how you get on?

If, still, nothing works then I'll think again!

Best wishes, John.

Edit/Update: I downloaded EDG Nemesis 4.4 last night. This morning I have installed it in FlashWizard Multiboot on my DM7000S and confirmed that it boots and runs OK.
Tonight I hope to use blue button download and install for Dropbear 0.48. Then I will attempt update to Dropbear 0.52 + SFTP Server. I should be in a much better position to help and advise you then.
 

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
John,

I have installed Gemini 4.7 and attempted to load Cccam and oscam from blue panel.
Being that you have good experience with the Gemini, can you shed some light ?

I wanted to give this image a try being that is one of the respected ones.

Kind regards
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
Hi @sucker69,

I have (at last) succeeded in installing Dropbear 0.48 in EDG Nemesis 4.4 (missing addons.url but I have it OK now). No time to try change to 0.52 but will try tonight.

Now to your new problem. Could you be more specific on what your problem is please?
With Gemini blue panel install, you just press Blue button on Dreambox remote control...highlight, Addons...Press OK...highlight, Download (Gemini-Server)...Press OK...highlight, Cam (30 entries)...Press OK...highlight, CCcam 2.1.4 - Complete...Press OK...then follow the on-screen prompts. Similar for Oscam (although I have not used it).

Hope this helps?

Best wishes, John.
 

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
John,

What do you think of EDG ?
I prefer it over Gemini. In Gemini I installed
emu via blue panel but find that it is not
running smoothly with Oscam. Maybe I need
to fine tune..
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
hi @sucker69,

I've not really had a chance to assess EDG Nemesis 4.4 yet. Initial feeling is that it has too many fiddly little info icons that I cannot read on my 5" screen but obviously would be fine on a normal TV.

I've not used oscam, just CCcam on it's own and it seems to run fine in Gem 470 for my purposes (key files). I assume you are doing CS but I know nothing about that, sorry.

I'll continue with getting SSH upgraded/running on the EDG image tonight, if I can find time, if not then over the weekend. Meanwhile I'll run Gem 470 during the day so that I have SSH comms with the box, while at work. The beauty of multiboot!

Best wishes, John.
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
Hi @sucker69,

I have Dropbear 0.52 + sftp-server working in EDG Nemesis 4.4.
I installed Dropbear 0.48 and then the new files as per my suggest procedure above.

However, in order to get it working, 2 missing lib files need to be ftp'd to folder /lib.

I also had to edit the start-up script /var/bin/dropbear.sh to force it to use RSA Key authentication. At the same time I added the bits to disable Password Authentication and to use a different port from 22. You will need to edit this file yourself to change the port number from 22222 to one of your choice.

Yet another thing, is that the /var/.ssh folder to which you ftp the file authorized_keys (see original how-to) must have attributes of 644. In my EDG image it was set 755, which prevented the SSH session from starting.

I have attached a zip archive (dropbear052_extra.zip) containing the two lib files and the edited dropbear.sh file.
Ftp dropbear.sh to /var/bin and chmod 755
Ftp the two lib files to /lib with no special attributes (644 is fine).

Hope this helps?

Best wishes, john.
 

Attachments

  • dropbear052_extra.zip
    289.8 KB · Views: 113

sucker69

Member
Joined
Apr 15, 2007
Messages
13
Reaction score
0
Points
1
Age
55
My Satellite Setup
dreambox
My Location
Uk
John,

Thank you for your hard work.
All is running a treat.
How did you analyse that the lib files were
missing ?

I am in debt to you, thanks.
 

td03-5

.
Joined
Dec 21, 2004
Messages
373
Reaction score
0
Points
0
Age
76
My Satellite Setup
.
My Location
UK
Hi @sucker69,

Glad I was able to help and thank you for the thanks.
I ran /var/bin/dropbear.sh manually from a Dreambox Telnet session and the missing lib files were mentioned in the error messages printed to the (console) screen.
As I knew they must exist in the Gem4.70 image, I just opened an FTP session to /var/mount/usb/fwpro/gemini470.img/lib and ftp'd them back to my netbook then changed ftp directory to /lib (in the running EDG image) and ftp'd them in.

It's good to have someone on here asking about the more tecky aspects of a Dreambox rather than; Where can I get a 'Sea Lion'!! :)

Best wishes, John.
 
Top