Raspberry Pi headless question - Printable Version +- MinimServer Forum (https://forum.minimserver.com) +-- Forum: MinimServer (/forumdisplay.php?fid=1) +--- Forum: General (/forumdisplay.php?fid=2) +--- Thread: Raspberry Pi headless question (/showthread.php?tid=6087) Pages: 1 2 3 Raspberry Pi headless question - stumpi - 26-02-2021 17:16 Hi, I am new to the forum and have a fairly basic question. I am planning to install MinimServer2 on a Raspberry Pi which is running headless; so I need to work from the command line in a terminal window. Having read the instructions on how to install MinimServer2 I know I will be asked to specify a 'Linux style path' to my music directory. I will be using a 256Gb Usb drive directly plugged into the Pi. Could someone kindly tell me what the correct Linux style path to the Usb would look like? Sorry – very new to Linux. Many thanks. RE: Raspberry Pi headless question - simoncn - 26-02-2021 18:02 On my Raspberry Pi, the USB drive is available at /media/pi/d6897c8e-ff6d-43da-8428-c8879dc1486a. The long number at the end will be different for you. RE: Raspberry Pi headless question - simbun - 27-02-2021 12:02 If you're using Rapberry Pi OS and already have your music collection on a USB drive then just plugging it in should automount it under the location (media/pi/) simoncn suggested above. If you're not using Raspberry Pi OS, or not happy with the defaults (I think it'll be mounted readonly so you'll need to unplug it to update your music) then the following guide covers the basics. If on the other hand you wanted to mount it as native storage and intended to transfer your music to it over your network then something like this guide should help. RE: Raspberry Pi headless question - stumpi - 27-02-2021 13:56 Hi Simon & Simbun, Thank you for the replies, I have now realised that the rpi which is running Raspbian Lite auto mounts the Usb drive, so thanks for that. Unfortunately I have not got that far yet because I cannot seem to copy the MinimServer2 archive file to the pi home folder. I am using Windows 10 Powershell to access using 'ssh' and all Pi commands work as expected. If I try to use SCP (secure copy) I get a request for the Pi password, which no matter how many times I type it will not work (bear in mind I am already logged in with this password), on other occasions I get the following error message cp: cannot stat 'MinimServer-2.0.16-linux-armhf.tar.gz': No such file or directory. Just for clarity I definately have this file in my downloads folder and on the desktop. Any ideas as to what I am doing wrong? Many thanks for your help. RE: Raspberry Pi headless question - simbun - 27-02-2021 15:51 What command are you using? Command should be: scp "drive:\path\filename" "user@host:/target/path/" If you're using public key authentication you'll need to pass that too: -i "drive:\path\to\key" FYI: Raspbian Lite is now known as Raspberry Pi OS Lite as of the middle of last year. RE: Raspberry Pi headless question - stumpi - 27-02-2021 16:49 Hi Simbun, Working from the Raspberry Pi Foundation site I have been trying to use the following example command. scp myfile.txt pi@192.168.1.3: I thought this was too simple, as there is no drive:\path. Following your advice I have now tried the following commands. scp drive:\path\filename user@hostname: scp drive:\path\filename user@IP address: neither of these work, could you clarify if I should use 'hostname' or 'IPaddress' and tell me what 'target/path' should be? Sorry I am not getting this but many thanks for your help. RE: Raspberry Pi headless question - simbun - 27-02-2021 17:44 (27-02-2021 16:49)stumpi Wrote:  Hi Sibun, Working from the Raspberry Pi Foundation site I have been trying to use the following example command. scp myfile.txt pi@192.168.1.3: I thought this was too simple, as there is no drive:\path. Following your advice I have now tried the following commands. scp drive:\path\filename user@hostname: scp drive:\path\filename user@IP address: neither of these work, could you clarify if I should use 'hostname' or 'IPaddress' and tell me what 'target/path' should be? Sorry I am not getting this but many thanks for your help. scp "drive:\path\filename" "user@host:/target/path/" Sorry, you were supposed to substitute everything apart from "scp", "@" and ":" for whatever applies to your situation :-) Assuming you've just installed Raspberry Pi OS I'm assuming you're logging in as the user Pi. Am I right in thinking that your Pi server is at 192.168.1.3? In which case, assuming you're already in the directory of the local file that you want to upload i.e. "dir /B myfile.txt" returns myfile.txt: Code: scp myfile.txt pi@192.168.1.3: Should upload myfile.txt to the home directory (/home/pi) of the user pi on the server at 192.168.1.3 If you're not in the directory of myfile.txt you'd use: Code: scp "c:\downloads\myfile.txt" pi@192.168.1.3: Or wherever "myfile.txt" is located. RE: Raspberry Pi headless question - stumpi - 27-02-2021 18:24 Hi Simbun, Sorry for my lack of clarity - I had changed the text in the command to suit my individual circumstances. I was trying to keep particularly the IP address anonymised (I am not sure if I need to do that or not)? So pi@192.168.1.3: is not my IP address it is just the example used on the Raspberry Pi Foundation site. So assuming I have substituted all the text for that applicable to me I have tried the following commands: scp C:\users\user\downloads\MinimServer-2.0.16-linux-armhf.tar.gz pi@hostname: scp C:\users\user\downloads\MinimServer-2.0.16-linux-armhf.tar.gz pi@IP address: scp C:\users\user\downloads\MinimServer-2.0.16-linux-armhf.tar.gz pi@hostname:/home/pi scp C:\users\user\downloads\MinimServer-2.0.16-linux-armhf.tar.gz pi@IP address:/home/pi None of these work, but I now have a new error message as follows: ssh: connect to host c port 22: Connection timed out Many thanks for your patience. RE: Raspberry Pi headless question - simbun - 27-02-2021 18:56 (27-02-2021 18:24)stumpi Wrote:  None of these work, but I now have a new error message as follows: ssh: connect to host c port 22: Connection timed out That error message simply tells you that it can't connect to the server. It might be easier to give MobaXterm a try as it'll allow you to drag and drop files. Download and unzip the Portable edition and run "MobaXterm_Personal_20.6.exe". Click on "Session", choose "SSH", enter your remote IP and username then click OK. At this point I think it will automatically open a new connection to the server (and ask for password), but if not, click on the session you just created in the left pane of the interface. By default you'll have a sftp pane on the left that will show you your remote home directory, and a terminal on the right, and you should be able to just drag the MinimServer install file onto the window. RE: Raspberry Pi headless question - simbun - 27-02-2021 19:42 I think I may have it; are you trying to run scp through the ssh session? You run the scp command from a windows command (or the powershell) prompt and copy the file from Windows to Linux. If you run the command once you've connected over ssh you're essentially trying to connect back to your Windows PC (which I doubt will have a ssh server running). At least that would make sense with: cp: cannot stat 'MinimServer-2.0.16-linux-armhf.tar.gz': No such file or directory ssh: connect to host c port 22: Connection timed out