can not create ssh file in /boot/... permission denied?

1,311 views
Skip to first unread message

Brisbane Stomp

unread,
May 9, 2017, 11:42:13 PM5/9/17
to ClusterHAT
so as above i cannot create the ssh file. to be clear i did the following commands,
cd /boot/
mkdir ssh
permission denied

am i correct in thinking this ssh file will run all pi zeroes upon load up with the 2 second delay? at the moment
i have to manually turn on the pi zeros in the clusterhat application, when i do i get orange lights to the corresponding pi i have turned on.

starting to get a bit overwhelmed as to what im supposed to do now, i have used the correct img files given on the cluster hat web site,

also how do i access the other zeros through the main pi 3?

Brisbane Stomp

unread,
May 10, 2017, 3:22:38 AM5/10/17
to ClusterHAT
for anyone wondering.... i think the ssh file is now automaticly in the /boot/ folder, and the way to access the setting is in the bios itself by simply turning ssh on or off. something that seems to be too hard to simply explain lol

Chris Burton

unread,
May 10, 2017, 7:27:13 AM5/10/17
to ClusterHAT
Hi,

so as above i cannot create the ssh file. to be clear i did the following commands,
cd /boot/
mkdir ssh
permission denied

You probably need to create a file rather than a directory and as a pi user it's normal to not have permission to write in the /boot directory.

Running "sudo touch /boot/ssh" as the pi user should create the file which will enable the SSH service after a reboot.
 
am i correct in thinking this ssh file will run all pi zeroes upon load up with the 2 second delay? at the moment
i have to manually turn on the pi zeros in the clusterhat application, when i do i get orange lights to the corresponding pi i have turned on.

The "/boot/ssh" file will enable the SSH service on the Pi you have created it on, so if you want to enable remote SSH access for Controller and Pi Zeros you need to create the file on Controller and each Pi Zero filesystem.
 
starting to get a bit overwhelmed as to what im supposed to do now, i have used the correct img files given on the cluster hat web site,

also how do i access the other zeros through the main pi 3?

Before SSH is enabled you can log into them via serial  (from the Controller) for example using "minicom p1", press enter and *wait* for the login prompt (press Ctrl-A and then Q to disconnect from minicom).

After SSH has been enabled you can SSH in using "ssh p...@p1.local" from the Controller and in most cases other machines on the local Ethernet connected network (assuming you can SSH to "controller.local" you should be able to SSH to "p1.local"). 
 
for anyone wondering.... i think the ssh file is now automaticly in the /boot/ folder, and the way to access the setting is in the bios itself by simply turning ssh on or off. something that seems to be too hard to simply explain lol 
 
The ssh file in /boot isn't created automatically, you need to create the file to enable the SSH service (the Pi have no BIOS) - https://www.raspberrypi.org/blog/a-security-update-for-raspbian-pixel/

Chris.
Message has been deleted

Brisbane Stomp

unread,
May 14, 2017, 11:50:30 AM5/14/17
to ClusterHAT
so i can now make an ssh file, i can turn on the pi zeros with clusterhat on all, btw is that just the same as turning them on manually in the clusterhat application, because when i restart the pi3, all lights are of and need to re code them on again, and i also need to re set manually ssh for p2 which a can then get ssh p2 access through the terminal, but i canot get any access for p1, at all not in ssh, minicom p1, only p2 can get minicom access, is minicom serial access? also as i said after reboot everything i did in minicom or ssh is reset on me as i need to enter minicom for p2 again to allow ssh access so controller can ssh p2,


On Wednesday, May 10, 2017 at 1:42:13 PM UTC+10, Brisbane Stomp wrote:

Brisbane Stomp

unread,
May 14, 2017, 12:25:35 PM5/14/17
to ClusterHAT

to my amazment the exact same code iv done for 3 hours over and over decided to work for some unknown reason, here is a pic of what i have running atm, yet to reboot... :p think ill hold off on rebooting till i get your reply on earlier matters. you should get 3 pics, one of succesfull pi1 and pi2 in ifconfig which is where im at
3.png

Brisbane Stomp

unread,
May 14, 2017, 12:46:38 PM5/14/17
to ClusterHAT
i rebooted with success, seems to take some time to load the zeros after power on, last p3 zero can not access minicom p3 tho

Scott Beeker

unread,
May 14, 2017, 1:36:08 PM5/14/17
to ClusterHAT
You need to "sudo" from a mac or linux to have the permissions as you are writing to another device, etc.
On mac I just do a "sudo /Volumes/boot/ssh"

Scott Beeker

unread,
May 14, 2017, 1:38:56 PM5/14/17
to ClusterHAT

Scott Beeker

unread,
May 14, 2017, 1:50:19 PM5/14/17
to ClusterHAT
What I see is you never rebooted.   When you do anything on the PI that requires supervisor privileges you need to do "sudo" You needed to do "sudo reboot".
I am not sure what you have accomplished?  You had issues with power on of pies to.  Download the clusterhat.sh program that turns all the pis on / off.  Do not change that in any way.  
Download the script and make it executeable.   "sudo chmod ugo+x ./clusterhat.sh"


If you created the pis according to the instructions....

1) Upon boot do "sudo ./clusterhat.sh on all".  (you do not need to "sudo" if you changed permissions for everyone, but I did not make it executeable for all.

2) when you want to shut down do "sudo ./clusterhat.sh off all".

As long as you can ssh into each of the zero pis you are good to go.

If you cannot ssh you need to either create the /boot/ssh file.  "sudo touch /boot/ssh". //* best to do this when creating images..... after flashing image on pi zero. whatever volume you use add the /boot/ssh to command..  In my case the SD card is mounted as /Volumes/boot.  So do a "sudo touch /Volumes/boot/ssh" which works to create the ssh file on the /boot partition. 
You need this as the PIs now look for it to enable the ssh service.

At this point you should be able to "ssh <ipaddresses> of pi.    This is tricky on the clusterhat.sh.   I followed the first three pages of Robs instructions at it worked great...  The pi zeros actually are bridged individdually to the pi 3.  Each one is a seperate network.        

Follow these instructions...   (Note: You may have to swap wlan0 and wlan 1.  I had to the second time I did it. )



On Sunday, May 14, 2017 at 12:46:38 PM UTC-4, Brisbane Stomp wrote:

Brisbane Stomp

unread,
May 14, 2017, 8:31:09 PM5/14/17
to ClusterHAT
thanks scott, the above pictures were to show i am successfully accessing the p1, p2 and controller through ssh p...@p1.local etc... and another pic to show the ssh file i have made and confirmed is their by opening the ssh file, for some reason i have no need to sudo ssh, but will do anyway, before my success i constantly "after making ssh and activating ssh" would end up with the same message after ssh p...@p1.local etc, saying local name not known as you can see from one of the pics above as im having the same problem with p3, i cant make an ssh if the terminal cant see it, i was able to minicom p1 and 2 to get access, but minicom p3 also does not recognise p3 at all in any way as the above pic also shows, with sudo or not as i just tried. i assume by the exe you mean the app i just click on and off for each pi? i have it already as i did a simple img install given on the site for each pi and already configured. does this also mean after all is set up we have to turn them all on via the exe app manually? ill post a pic after this of the minicom p3 fail.

Brisbane Stomp

unread,
May 14, 2017, 8:40:54 PM5/14/17
to ClusterHAT

my minicom and ssh fail, so my p3 has no ssh, unsure how to make one when i cant see the p3 in minicom to make the ssh, is their a way to run the p3 in the terminal on my main pc with the sd card also slotted into my main pc? not sure how to go about it, btw.... i did make an ssh on p3 last night and still didnt recognise in ssh or minicom and got the same result as todays attempt as i did a fresh img load this morning, im halfway their anyway lol

Brisbane Stomp

unread,
May 15, 2017, 2:00:37 AM5/15/17
to ClusterHAT
i have a question about the img files for download on the site... wouldnt it be easier make the img for all pies, install software and also make ssh files so everything is working auto on first log in perfectly, then copy the finished img and post them on the website, surely making an img of a program keeps the settings, adjustments and additions to the img file? 

Chris Burton

unread,
May 15, 2017, 2:50:23 PM5/15/17
to ClusterHAT
Hi,

On Monday, 15 May 2017 07:00:37 UTC+1, Brisbane Stomp wrote:
i have a question about the img files for download on the site... wouldnt it be easier make the img for all pies, install software and also make ssh files so everything is working auto on first log in perfectly, then copy the finished img and post them on the website, surely making an img of a program keeps the settings, adjustments and additions to the img file? 

The image is basically the same for the controller and Pi Zeros, the only difference is the contents of the cmdline.txt file in the boot partition, the image is then configured on first boot.

Specific images are provided for Controller/P1/P2/P3/P4 to make things easier for those who don't want to edit the files by hand.

Chris.

Brisbane Stomp

unread,
May 15, 2017, 7:08:16 PM5/15/17
to ClusterHAT
I see your point but what I'm saying is that after a lot of reading on the forum I see a few people with the same problems, it was just a bit harder for me to explain as I'm very new to any of this. My point is regardless of the img being similar they are still in need of ssh and some amount of code and changes in settings. A lot of problems might be fixed by just downloading a full functional image of each pi. A copy of the finished images. To me it makes a lot more sense but I'm new and im not aware of what's possible or not. It's just getting beyond a joke for me as I spend hours following instructions and inputting new code like minicom etc and then hit the same problems as before and now minicom don't work. Literally doesn't recognise the p3 or p4. Like I said other have the same issue and I'm yet to find a post with a resolve.

Chris Burton

unread,
May 16, 2017, 5:57:24 AM5/16/17
to ClusterHAT
Hi,


On Tuesday, 16 May 2017 00:08:16 UTC+1, Brisbane Stomp wrote:
I see your point but what I'm saying is that after a lot of reading on the forum I see a few people with the same problems, it was just a bit harder for me to explain as I'm very new to any of this. My point is regardless of the img being similar they are still in need of ssh and some amount of code and changes in settings. A lot of problems might be fixed by just downloading a full functional image of each pi. A copy of the finished images. To me it makes a lot more sense but I'm new and im not aware of what's possible or not. It's just getting beyond a joke for me as I spend hours following instructions and inputting new code like minicom etc and then hit the same problems as before and now minicom don't work. Literally doesn't recognise the p3 or p4. Like I said other have the same issue and I'm yet to find a post with a resolve.  

The Cluster HAT image files are based on Raspberry Pi Raspbian where the SSH service is disabled by default, you might want to check the previous discussions on the Raspberry Pi forum re disabling SSH to see their reasons.

From my personal view when I last modified SSH to log the credentials being used to try and log into a machine directly on the internet I found it would take less than 4 hours for a Pi with the standard "pi/raspberry" credentials to be compromised. So in my opinion it's worth disabling SSH and advising a password change at the expense of a little more time during setup to improve the security of the installation and health of the internet.

Chris.
Reply all
Reply to author
Forward
0 new messages