6 Replies Latest reply on Feb 2, 2016 11:23 AM by Shoban_Narayan

    Running ftp server on Galileo

    jhmurry_Intel

      After putting Linux on the SDCard and using telnet to browse around directories I noticed that SD card files are found under /media/realroot (ie... viewing with   ls /media/realroot ). I want to be able to easily add/remove files from the sdcard without taking it out. FTP seems like one easy way to do this.

       

      Does the Galileo Linux have an ftp server on it I can start? If not, is there an easy one to put on it?

        • 1. Re: Running ftp server on Galileo
          SergeyK

          Who is using FTP nowadays? :-)

           

          You can use SFTP/SCP to copy files to or from Galileo. I think the default SD image has a configuration problem, which is easily fixed. Open /etc/ssh/sshd_config in your favorite text editor (vi?!). Find "Subsystem sftp" line and change it to "Subsystem       sftp    internal-sftp" (without quotes).

          Next either reboot your Galileo or restart sshd (e.g. using "/etc/init.d/sshd restart" command).

           

          As for SFTP client - WinSCP is a really nice one for Windows. On Linux / UN*X you can use 'sftp' or 'scp' commands.

           

          Hope this helps.

          Sergey

          1 of 1 people found this helpful
          • 2. Re: Running ftp server on Galileo
            jhmurry_Intel

            Sergey. Thanks this worked. I downloaded the WinSCP from http://winscp.net . The first time I tried to connect (without doing any of the changes you mentioned) it didn't work. I then tried the restart command to see if I just needed to start the service and that didn't work. I was playing around to see if I could avoid changing any settings. When I switched from using SFTP to using SCP, it worked without the configuration change you mentioned and I was able to very easily transfer files.

             

            For anyone else that tries, here is some additional information (using default settings on Galileo):

            File protocol: SCP

            Host Name: Type in the IP address here of Galileo

            Port Number: 22 (default choice)

            User Name: root

            Password: leave this blank

            1 of 1 people found this helpful
            • 3. Re: Running ftp server on Galileo
              Seth Hunter

              I just sent directions to a colleague on the work pipeline that we are using on windows 7. We have a hidden SSID that we use for prototyping so the steps are a little different. I thought I would share this rough outline with the larger community in case its useful to anyone else!

               

              ----------------------------------------

              First - Make sure your galileo is connected to the internet:

              http://www.malinov.com/Home/sergey-s-blog/intelgalileo-addingwifi

               

              A) generate the wpa-supplicant file (using arduino example or using step 1 in Sergi's tuturial above)

              B) Modify the wpa-supplicant to have "scan_ssid=1" after the psk using vi

              C) add "auto wlan0" (see step 3) to the /etc/network/interfaces file so it works every time you restart

              D) use ifup wlan0  to restart the network lease process a few times if doesn't work.

              E) TEST! ping google.com and see if that works.

               

              --------------------------------------------

              Second -Now you are ready to setup SFTP for rapid Prototyping on Intel Galileo once you are connected to a Wifi Netork.

               

              Configure galileo to allow SFTP (using OpenSSH)

              https://communities.intel.com/thread/46175

               

              in etc/ssh/sshd_config

              change the Subsystem line to this: "Subsystem sftp internal-sftp"

               

              ---------------------------------------------------------------------

              Finally, choose an environment: Sublime or FileZilla

               

              Make sure your computer is on the same network as the Galileo.

               

              Using Filezilla:

              Host name/IP Address (get this by calling ifconfig from the linux side of galileo over the serial port)

              Choose SFTP as your communication protocol

               

              Using Sublime:

              1) install package manager (put script in)

              2) CNTR-SHIFT-P  (brings up commandline browser)  type: "install"

              3) Select "browse packages": Install Package (press enter)

              4) Search for SFTP (hit enter)

              5) SFTP is now installed

              6) CNTR-SHIFT-P  - add a new server   root@192.168.15.xxx /home/root  (or whatever directory you want it to start at)

               

              As long as your computer is on the same network as the galileo, you should be able to browse the galileo file system from your editor, modify files and save them and test from putty immediately.

              • 4. Re: Running ftp server on Galileo
                MarcIII

                The tiny image in the SPI flash is too small to hold sshd. However even this small image has an ftpd server (busybox') which you can use to browse Galileo files remotely using Windows Explorer or any other ftp client. Start the server like this:

                 

                telnetd -l /bin/sh
                cd /directory/to/serve/with/FTP
                tcpsvd 0 ftp ftpd -w &

                 

                Using PPP these can also be used over a serial cable (instead of Ethernet); see more PPP details here: Galileo Minicom issues

                1 of 1 people found this helpful
                • 5. Re: Running ftp server on Galileo
                  MarcIII

                  SergeyK wrote:

                   

                  Who is using FTP nowadays? :-)

                   

                   

                  The Windows Explorer now has a built-in FTP client (not any SSH one).

                  • 6. Re: Running ftp server on Galileo
                    Shoban_Narayan

                    I have been asked for a password and if I just press enter without any password it says password incorrect, what is the password for galileo?