Notifications
Clear all

Help with adding SSH to Raspberry Pi  

  RSS
5thumbs
(@5thumbs)
Active Member
Help with adding SSH to Raspberry Pi

I'm sorry to ask but I cannot figure out how to add some instructions to Octopi on my Rasp Pi 3plus to control  the variable focus Arducam camera on my Prusa Mini.   The instructions are here  https://plugins.octoprint.org/plugins/ArducamCameraControl/    and I have added the plugin.   I cannot figure out how to SSH and add the "instructions that they indicate" to the Pi via what they call SSH.   Do I put this onto the SD card or do I somehow send it to the Rasp Pi via Wifi?   I've gotten the Octopi to work fine for prints, I just cant add the instructions to take control of the Arducam Camera focus and zoom features.   Thanks for your help.  Also, if there is a better place for me to post this question, please let me know.  THank you,  5thumbs

Posted : 03/08/2021 9:45 pm
Diem
 Diem
(@diem)
Noble Member
RE: Help with adding SSH to Raspberry Pi

SSH is already installed in the Raspberry Pi but might need to be enabled.

In recent versions:

Preferences > Raspberry Pi Configuration > Interfaces

For older versions go to: https://www.raspberrypi.org/

Cheerio,

Posted : 04/08/2021 12:44 am
5thumbs
(@5thumbs)
Active Member
Topic starter answered:
Diem - thanks

Diem, Thanks.  I dont think the settings are already in there to be enabled.  If you click on the link you will see a bunch of lines that need to be added.   I regret I'm not even sure how to access SSH.    Perhaps someone can provide some additional info I can combine with yours to figure this out.  THanks again.

Posted : 04/08/2021 2:20 am
bobstro
(@bobstro)
Illustrious Member
What OS and ssh client are you using?

It sounds like you've got OctoPrint running since you added the plugin. If so, you need a ssh client for your OS (Windows or Mac)? Then connect by specifying the same IP address or hostname you used to connect to OctoPrint on port 22. If ssh is enabled, you should be promoted for the pi user password. Let us know what OS you're on and what ssh client you plan to use.

My notes and disclaimers on 3D printing and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan...
Posted : 04/08/2021 4:05 am
5thumbs
(@5thumbs)
Active Member
Topic starter answered:
Bobstro I'm using a Mac

I'm using a Mac OS.    

Do I take the SD card out of the Rasp Pi and connect that to my Mac, or do I somehow perform the SSH via Wifi while the Rasp Pi is connected.   Do I then just cut/paste in the lines they show in the link provided in my original post.  Thank you very much.  

Posted : 04/08/2021 4:10 am
jsw
 jsw
(@jsw)
Noble Member

The trick to enabling ssh in recent versions of the OS is to create a file called 'ssh' in the /boot directory.

From the command prompt.

sudo su -

cd /boot

true > ssh

reboot

ssh will be live when the device reboots.  There are many variations on this theme but the lines above will do it.  Login username will be 'pi' and the password is what you set it to on install.

Posted : 04/08/2021 5:06 am
Diem
 Diem
(@diem)
Noble Member
RE: Help with adding SSH to Raspberry Pi

SSH is effectively an encrypted version of telnet.  The linked commands are to be transmitted to the Pi via ssh...

ssh is already installed on every version of Pi OS that I know of.

Cheerio,

Posted : 04/08/2021 5:35 pm
bobstro
(@bobstro)
Illustrious Member
Easy way and manual way
Posted by: @5thumbs

Do I take the SD card out of the Rasp Pi and connect that to my Mac, or do I somehow perform the SSH via Wifi while the Rasp Pi is connected.   Do I then just cut/paste in the lines they show in the link provided in my original post.  Thank you very much.  

There are, of course, multiple ways of doing things. Here's a step-by-step that should work on any OS.

These days, I recommend the Raspberry Pi imager. It can be used to build any RPi OS and includes out-of-the-box configuration options for OctoPrint. It's a nice one-stop solution that will download many common RPi distributions.

Once you've installed the imager, click Choose OS->Other specific OS:

Select OctoPi:

After you've selected the OctoPi image, press Ctrl-Shift-X to access the super-secret menu that's not shown on the main interface for some reason. Check Enable ssh and enter a password that you'll remember.

You can also enable and configure your wireless settings in this menu (scroll down):

Install a card reader with your MicroSD card installed and select it:

Click the Write button to write and verify the image. 

You could do these steps manually by:

  1. Writing the OctoPi image to your MicroSD card.
  2. Creating a file named ssh (with no file extension) in the /boot (MSDOS) partition of the card.
  3. Create a file named wpa_supplicant.conf in the /boot (MSDOS) partition of the card containing something like:

 

## WPA/WPA2 secured

# Pay attention to the quotes!
network={
  ssid="YOURSSID"
  psk="YOURPSK"
priority=100
}

# Uncomment the country your Pi is in to activate Wifi in RaspberryPi 3 B+ and above
# For full list see:  https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 
country=US # United States

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

(replace ssid & psk with your actual settings, of course.)

Put the card in your RPi and fire it up. Once it's up and connected, on your Mac open a terminal and try:

ssh [email protected]

With a bit of luck, you'll be able to log in using the password (default "raspberry") that you specified for the pi user in the options menu.

My notes and disclaimers on 3D printing and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan...
Posted : 04/08/2021 9:45 pm
Share: