Announcement

Collapse
No announcement yet.

Newbie with HT-PI-G2 need help editing a file in Linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    So say I want to copy a file from windows over to my Linux HT-Pi-G2. (The file is Here: C:\Users\Steve\Desktop\HomeSeer HS4\html) The file is over on my Windows 10 machine. I have tried using WinSCP and get an error Permission Denied. I am new to Linux. Can someone explain to me how to do this?

    Pete showed me this to edit a file and that worked. I don't understand how to copy a file from Windows 10 into Linux:

    Via command line:

    1 - ssh to IP of HT-PI-G2
    2 - type sudo su
    3 - password
    4 - cd /usr/local/HomeSeer/html * copy and paste is easiest
    5 - ls
    6 - nano edit file in question.

    I want to copy the file to line 4: cd /usr/local/HomeSeer/html * copy and paste is easiest

    What does he mean by *copy and paste is easiest. (what would be the code for that?)

    Thanks in advance.

    Steve

    Comment


      #17
      I don't use WinSCP but here's how to do it with scp (Secure Copy):

      Open a Command window and type:

      cd \Users\Steve\Desktop\HomeSeer HS4\html

      scp file_to_copy root@ip_of_HT-PI-G2:/usr/local/HomeSeer/html/.

      The ":" after the IP and the "/." at the end of the target are important.
      Last edited by kenm; March 13, 2022, 11:20 AM. Reason: Changed user from 'pi' to 'root' for scp command since root owns /usr/local/HomeSeer.

      Comment


        #18
        Thanks. Once I was able to change the root password I was able to get into the device and then use winscp to copy and transfer all the files I needed to. I would never have learned any of this without you guys on this forum.

        Comment


          #19
          A word of caution: The 'root' user, as well as the 'su' and 'sudo' commands should be used with extreme care, particularly by novice users. IMHO, the root user should not even be allowed to ssh into the unit and /usr/local/HomeSeer should be owned by a user other than root. There are ways of allowing a normal user access to system resources, like serial port, etc, without running as root.

          Comment

          Working...
          X