help with enabling ssh on an instance of octoprint

February 13, 2024, 20:39

arad4832

i am trying to enable ssh on my raspberry pi zero w 2 but i am struggling. in the raspberry pi imager, i am enabling ssh but no matter what i do, it does not work. when i checked the ssh file it had made, there was nothing there. so now i dont know what to do. i have already searched this up online but i cant find anything useful.

k9t33n

do you have a display?

arad4832

no

arad4832

i do have access to the local files tho

k9t33n

ok when you boot it up go into your network config and see if you can see your pi

arad4832

sorry i dont really get it i am new to raspberry pi's

arad4832

can i first say where i am right now?

k9t33n

sure

arad4832

right now i have a fresh sd card flashed with the image of octoprint from the raspberry pi imager

arad4832

the sd card is still in my computer and i have not set up octoprint or have i put it into the raspberry pi

arad4832

hello?

illegitimate_egg

the SSH file shouldn't have a contents, so the fact that it's empty and hasn't been written to is good

illegitimate_egg

how are you trying to connect?

arad4832

before i was connecting thru windows powershell but then when i give it the password, it says its incorrect

illegitimate_egg

hmm

illegitimate_egg

so SSH itself must be working

arad4832

for the command that i use, i type "ssh pi@(my pi's ip address)

illegitimate_egg

yeah

illegitimate_egg

that's cool

illegitimate_egg

so

illegitimate_egg

the default password is raspberry

arad4832

i have tried that as well

illegitimate_egg

damn

illegitimate_egg

uhh

arad4832

but since i cant see how the password is typed, i dont know if i am making a spelling mistake or not

illegitimate_egg

ah

illegitimate_egg

ok

illegitimate_egg

if you just copy the word "raspberry"

illegitimate_egg

in powershell when it asks for the password you can just right click and it will paste it in

arad4832

wait

arad4832

i am using the latest version of the pi imager

arad4832

that has some options for a username and password

illegitimate_egg

yeah

illegitimate_egg

it has for a while

illegitimate_egg

it was mentioned on the octoprint setup page

arad4832

oh

arad4832

i havent checked that lol

illegitimate_egg

lol

arad4832

so wait

arad4832

do i leave the password field empty or?

illegitimate_egg

uh

illegitimate_egg

it's best to have a password

illegitimate_egg

but I don't think you actually need one

arad4832

wait

arad4832

is it normal for the ssh file to disappear after setting up octoprint?

illegitimate_egg

uhh

illegitimate_egg

wdym by setting up octoprint

illegitimate_egg

what specifically

arad4832

like when i go through the setup proccess of the web interface

illegitimate_egg

hmm

illegitimate_egg

let me check something

illegitimate_egg

yeah

illegitimate_egg

if it's enabled that file gets deleted

illegitimate_egg


arad4832

ohhh

arad4832

ok

arad4832

im going to try that and i will be back

arad4832

but for when i setup a username and password though

arad4832

do i have to set it up with a user name or just a password

illegitimate_egg

you need a username

arad4832

how would i use the username to access the pi thru ssh?

illegitimate_egg

so, assuming the username was pi

illegitimate_egg

as you were already doing it's just ssh pi@[ip address/local dns]

arad4832

wait

arad4832

but the username that i set is different

arad4832

is that the problem?

illegitimate_egg

oh

illegitimate_egg

yeah

illegitimate_egg

it would be

illegitimate_egg

ssh [username]@[host]

arad4832

okay i will try that and see if it works

arad4832

my pi is currently starting up

arad4832

but will loading a backup ruin the ssh?

illegitimate_egg

it depends how you're doing backups

arad4832

i am using the automatic tool that octoprint has

illegitimate_egg

it should be fine, that's just octoprint configuration stuff that shouldn't be touching ssh

arad4832

just to make sure, it is normal for the first boot to take a while right?

illegitimate_egg

yeah

illegitimate_egg

it has to do some stuff like expanding file systems

arad4832

okay thanks!

arad4832

by the way, does the raspberry pi zero 2w use the 2.4ghz band or 5 ghz or both for wifi?

illegitimate_egg

let me check

illegitimate_egg

it's just 2.4

arad4832

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ED25519 key sent by the remote host is SHA256:JkV4WjVxxd66eiBLp1A4pyPxci5rbTxqmRrgYcyyI/E. Please contact your system administrator. Add correct host key in C:\\Users\\arad2/.ssh/known_hosts to get rid of this message. Offending ED25519 key in C:\\Users\\arad2/.ssh/known_hosts:1 Host key for 10.0.0.239 has changed and you have requested strict checking. Host key verification failed.

arad4832

i got this error

arad4832

i am sure that this is not a man-in-the-middle attack

illegitimate_egg

yeah that makes sense

illegitimate_egg

dw

illegitimate_egg

do you use ssh for anything else?

arad4832

i need it to install something for a camera that i have connected to work

arad4832

thats all

illegitimate_egg

okay, you can safely delete the known hosts file then

illegitimate_egg

as the error says it's at C:/users/arad2/.ssh

illegitimate_egg

if you can't find .ssh that's because it's a hidden directory

arad4832

i have seen a different solution online

illegitimate_egg

oh?

arad4832

and some people say it works

arad4832

actually all people that tried it

illegitimate_egg

is it just to remove the entry from the file?

arad4832

its just a command line in the terminal

illegitimate_egg

what's the command?

arad4832

ssh-keygen -R (pi ip)

illegitimate_egg

oh

illegitimate_egg

yeah

illegitimate_egg

that would work

illegitimate_egg

-R just removes the entry from known_hosts

illegitimate_egg

I didn't know you could do that

arad4832

thank you so much

arad4832

it worked

arad4832

i thought i had to edit alot of files or something

illegitimate_egg

np

arad4832

hi i need help with something again

arad4832

its with the pi camera that i have

illegitimate_egg

oh?

arad4832

i have both installed the picamera2 program and the thing that the company of the camera made

arad4832

still didnt work

illegitimate_egg

who made the camera

arad4832

freenove

arad4832

thats the company name

arad4832

i can provide a link to the camera

arad4832

its from amazon

illegitimate_egg

hmm

illegitimate_egg

have you enabled picamera2 in the raspi-config utility?

arad4832

i have installed it from the python website

arad4832

someone in the reviews gave a code to put in the config file of octoprint

arad4832


arad4832

<@685869137939267603>

illegitimate_egg

this is what we were going to change using raspi-config

illegitimate_egg

it just provides a nicer front end for it

illegitimate_egg

but this will work too

arad4832

i do not know where to insert the file though

arad4832

like at what line do i put it

illegitimate_egg

just add it to the end of config.txt

illegitimate_egg

I think there's an [all] specifier there

arad4832

where does this go? "libcamera-hello --list-cameras"

illegitimate_egg

the terminal

arad4832

oh

arad4832

ok

illegitimate_egg

you can run it over ssh if you want

arad4832

okay thanks

arad4832

i will test it now

arad4832

wait is the file that i need to edit called octopi .txt or does it have to be config.txt

illegitimate_egg

config.txt

illegitimate_egg

and after you edit it you have to restart your pi

arad4832

okay

arad4832


arad4832

is it supposed to be like this at the end?

illegitimate_egg

yeah

arad4832

okay

arad4832

the camera wont load

illegitimate_egg

hmm

arad4832

its just stuck on webcam loading

illegitimate_egg

what happens when you run the libcamera-hello --list-cameras command

arad4832

it recognized the camera

arad4832


illegitimate_egg

hmm

illegitimate_egg

that's odd

arad4832

but it still didnt load

arad4832

ill try restarting in safe mode

arad4832

bc i have ui customizer

arad4832

and alot of other plugins

illegitimate_egg

alr

arad4832

didnt work

arad4832

wait

arad4832

i think i might have to adjust the camera settings in octopi.txt

arad4832

nope

arad4832

didnt work

arad4832

<@661583386992836619>

arad4832

help

jannik44

whats up

arad4832

ive been having issues with a camera i have for my raspberry pi

arad4832

it does not work no matter what ive tried so far

jannik44

and why exactly can only I solve the problem right now? this is the one and only time i tell you this: if you @ me i expect it to be extremely important. if it isnt DONT PING ME!