Cannot get acces to raspberry pi 5 with ssh

April 29, 2024, 20:18

wambamitsbram

When I start up my pi with Raspberry OS lite installed, I cannot for the life of me connect through ssh. Everything I try, it gives an error message. I know the sd-card and Raspberry Pi worked because when i installed the Raspberry OS full i got monitor output and was inside the desktop enviroment. I am really lost here and I would love to have your help. Anymore info needed just ask and i'll provide.

alphabeta.

you might need to install a package. In the desktop open terminal and run sudo apt -y update && sudo apt -y upgrade && sudo apt install openssh-server

alphabeta.

For RaspberryOS I didn't have to do that. I haven't tried "lite". My guess is it's trimmed down so maybe that's what you need afterall

wambamitsbram

you mean on the pi

alphabeta.

yep

wambamitsbram

ahh okay thx

alphabeta.

I don't trust microsoft to do anything tho. I'd use putty on the windows side 😄

wambamitsbram

yeah but thats the thing that doesnt work

alphabeta.

yeah prob the ssh server package

wambamitsbram

i was discussing it with someone in <#982351314132566036>

wambamitsbram

and the pi did say it was already installed

alphabeta.

also, can you ping your device?

wambamitsbram

yes

alphabeta.

wait do you mean openssh-server was already installed?

wambamitsbram


wambamitsbram


wambamitsbram

this is me pinging my device

alphabeta.

is bpcnas added to your host file on windows?

wambamitsbram

wait what?

alphabeta.

if you're using the name you might need to tell windows what ip it goes to. Just use the IP

wambamitsbram

yeah but bpcnas is pinging correctly

alphabeta.

nice

wambamitsbram

but i get this with PuTTY

alphabeta.

oh

wambamitsbram

the same error as in cmd

alphabeta.

your screenshot isn't pingable

alphabeta.


alphabeta.

that's saying it's unreachable

wambamitsbram

ohh what

wambamitsbram

thats explains why PuTTY doesnt work

alphabeta.

on your pi run sudo apt-get -y install net-tools then ifconfig | grep "inet" and check for the ip

wambamitsbram

is also already installed on the pi

alphabeta.

ye what's the command output for the ifconfig | grep "inet"

wambamitsbram

i cant make this | sign in my terminal

alphabeta.

just do the full ifconfig

alphabeta.

ifconfig

wambamitsbram


alphabeta.

alright so try with 192.168.1.17 instead of the name

alphabeta.

putty preferably but either should work

wambamitsbram


alphabeta.

ye

wambamitsbram

still get connection timed out

alphabeta.

hmm

wambamitsbram


alphabeta.

ping 192.168.1.17

wambamitsbram


alphabeta.

yeah still not reachable

alphabeta.

out of curiosity what's your subnet mask on your windows box? ipconfig /all should tell ya

wambamitsbram


alphabeta.

alright so that's fine

alphabeta.

from the pi sudo ufw allow 22/tcp

wambamitsbram

btw is ethernet needed

alphabeta.

nah if you're connected to the same router

wambamitsbram

yeah thought so

wambamitsbram

ufw command not found

alphabeta.

no prob, ufw isn't installed

alphabeta.

hm

alphabeta.

so you can ping google.com from the pi right?

wambamitsbram

Seems like it

alphabeta.

yep

alphabeta.

so it's definitely connected

alphabeta.

when you imaged your raspberry pi did you set an ssh key?

wambamitsbram

what i do wonder is that the angry ip scanner does not show any other ip's then itself

wambamitsbram

tried with and without

alphabeta.

what's it currently on

wambamitsbram

i have now set it to password

alphabeta.

k

wambamitsbram

because i want to be able to connect multiple devices

alphabeta.

what is this 192.168.56.1 network?

wambamitsbram

thats my pc i think

wambamitsbram

at least thats what i named my pc

alphabeta.

nah your pc should be 192.168.1.72

wambamitsbram

wait wtf

alphabeta.

double check your ipconfig /all and send that

wambamitsbram

just making sure there is no sensitive info that i need to take out right?

alphabeta.

eh just give me the 192.168 address

alphabeta.

if there's multiple too

wambamitsbram


alphabeta.

the ipv4 address

wambamitsbram

btw was looking for the wrong range of ip

wambamitsbram


alphabeta.

do you have more than one nic?

wambamitsbram

nic?

alphabeta.

seems like it should work

alphabeta.

network card

wambamitsbram

this is a laptop

wambamitsbram

so i dont think so

alphabeta.

k

alphabeta.

really weird

alphabeta.

see that ping ms?

alphabeta.

1849 ms lol

alphabeta.

it's like you have two different routers or something

alphabeta.

or a hyperv network or

wambamitsbram

yeah we do have 2 networks on our router

alphabeta.

ah

wambamitsbram

ohh oops was that important

alphabeta.

possibly

wambamitsbram

because i am on the same network as the PI

wambamitsbram

i have triple checked

alphabeta.

in your ipconfig /all is there any other ipv4 ?

alphabeta.

should just be 192.168.1.72 and your loopback 127.0.0.1

wambamitsbram

i dont see a loopback

wambamitsbram

or the ip 127.0.0.1

wambamitsbram

DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::f130:2472:3dce:34d5%15(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.1.72(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : Monday, 29 April 2024 17:00:14 Lease Expires . . . . . . . . . . : Tuesday, 30 April 2024 22:17:14 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DHCPv6 IAID . . . . . . . . . . . : 147611384 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2C-4F-74-11-00-6F-00-01-02-35 DNS Servers . . . . . . . . . . . : 192.168.1.1 NetBIOS over Tcpip. . . . . . . . : Enabled

alphabeta.

ye not that then

alphabeta.

hmm

alphabeta.

what kind of network setup do you have

wambamitsbram

just a single tmobile router

wambamitsbram

with 2 network configured on it

alphabeta.

can you ping 192.168.1.72 from the pi?

wambamitsbram

host unreachable

wambamitsbram

so no

alphabeta.

if not it seems like your network is somehow filtering traffic between computers

alphabeta.

could be a firewall, or a configuration in the tmobile router

wambamitsbram

ohh wel fuck me

alphabeta.

normally if you're on the same subnet you can ping and connect to ports etc

alphabeta.

as far as your pc and pi are concerned you are on the same network. 192.168.1.0/24

alphabeta.

soooo ye firewall or router fuckery

wambamitsbram

and what if it is firewall

wambamitsbram

is that a router thing or a pc problem

alphabeta.

normally routers have a NAT, but allow traffic between computers in the same network

alphabeta.

a firewall for home computing is usually a software in the OS. but sometimes people with home labs have special firewalls they install to filter traffic even more

wambamitsbram

but i havent meddled with windows or the router

alphabeta.

er, how do you have two networks then

wambamitsbram

it was just configured in the router but my father did it

alphabeta.

he might have done some extra bits

wambamitsbram

i was there he just set them up and configured the passwords and was done

alphabeta.

not sure

alphabeta.

I wonder if your pc and the pi can both ping 192.168.56.1

wambamitsbram

or wait

wambamitsbram

my pi is taking a really long itme

alphabeta.

yeah some fuckery lol

wambamitsbram

but mu pc works

wambamitsbram

in an instant

alphabeta.

it's definitely how your network is configured

wambamitsbram

It is stuck on this

alphabeta.

yeah it's gonna timeout

alphabeta.

that's because somehow you're in a different vlan or subnet. idk what kind of network he has

wambamitsbram

The pi

wambamitsbram

my pc

wambamitsbram

with ipconfig

alphabeta.

ifconfig on pi probably says your gateway is 192.168.1.1 also

alphabeta.

same gateway, but somehow your connection separated through the network

wambamitsbram


alphabeta.

oh right linux uses a different command for gateway... one sec

alphabeta.

ip route show

wambamitsbram


alphabeta.

yep

alphabeta.

you're both connected to 192.168.1.0/24

wambamitsbram

but they still cannot communicate?

wambamitsbram

thats f ing weird

alphabeta.

ye because of how your network is configured or firewall

wambamitsbram

zyxel t54

wambamitsbram

This is the router if you are interested

alphabeta.

hm

wambamitsbram

is this maybe in anyway important

alphabeta.

nah just basic network stuff

wambamitsbram

ahh okay

alphabeta.

I doubt this matters but you can try turning off windows firewall from run: wf.msc then turn off domain, private, public

alphabeta.

hopefully somebody else can think of something

alphabeta.

I've thrown all I can at it at this point 😄

alphabeta.

well, maybe try rebooting :p

wambamitsbram

wait this is not dangerous i am not quite proficient in windows and seceurity but i do think the firewall is a big thing in the security of something?

alphabeta.

as a test

alphabeta.

turn it back on after

wambamitsbram

tried that and i have also reinstalled the os 4 times onto the sd

wambamitsbram

the pi or the pc

alphabeta.

any firewall you have

alphabeta.

turn it off to test

alphabeta.

if it still doesn't ping you've ruled that out

wambamitsbram

we can rule out the firewall

alphabeta.

there's 3 profiles for windows firewall use the wf.msc

alphabeta.

domain profile, private profile, public profile

wambamitsbram

how do i then turn them off

wambamitsbram

oh found it

alphabeta.

windowskey+r, type in wf.msc, click on each tab and press off. then apply

alphabeta.

ye

alphabeta.

anyway if it doesn't fix it, then turn them back on

alphabeta.

if it fixes it you just need to add a firewall rule

wambamitsbram

this good?

alphabeta.

you need to turn off the private and public profiles as off

alphabeta.

press windows defender firewall properties

wambamitsbram

ohh yeah got it

wambamitsbram

now it should be good right?

alphabeta.


alphabeta.

yep

alphabeta.

completely off at that point

wambamitsbram


alphabeta.

no luck

alphabeta.

turn em back on

alphabeta.

yep I'm at a loss

alphabeta.

I can't think of what it is

alphabeta.

I just setup my raspberry pi 5 and I have a wifi mesh too. it worked right away

wambamitsbram

thank you very much for your help then and i ever find the problem ill let you know

wambamitsbram

is it maybe smart to try ethernet

wambamitsbram

or doesnt that matter

alphabeta.

it might

wambamitsbram

ill try and ill ask around in some other discords maybe they know something

thunder07337

Ask your father how he has set up the WLAN. There is an option to prevent WLAN devices from communicating with each other. If he has set this, it is normal that you cannot reach the Pi when it is in the WLAN.

wambamitsbram

Ahh thx

wambamitsbram

My father said that he changed nothing about the settings and it is still stock settings

wambamitsbram

But maybe it is just tmobile that did something to the router or the firewall of the router is screwing with it

thunder07337

If necessary, ask your Internet provider if they have done anything. Otherwise, look for the instructions for the router and see if you can find anything there.

wambamitsbram

Would that also explain

wambamitsbram

This

wambamitsbram

Btw i find this weird i cannot even ping my router from my raspberry pi

thunder07337

This is not the router. 0 is the network itself. You have to ping 1, which is the router.

wambamitsbram

Ahh okay

wambamitsbram

It has been stuck on this for 5 minutes

thunder07337

Ask your Internet provider if the router comes from them. Something is not right.

oops.se

Can you login to the router and cech if "Client isolation" is turned on?

wambamitsbram

my dad has the login but i might be able to check it tommorow or something

wambamitsbram

wait

wambamitsbram

im on my guest netowrk

wambamitsbram

and it doesnt work

wambamitsbram

but once i switch to my regular network it does work

wambamitsbram

is there then something messed up in the settings

wambamitsbram

<@379464606835539971> i am not completely sure but i think thats it

thunder07337

Yes then, that's normal, that's what guest networks are for, to keep foreign devices out of your own network.

wambamitsbram

i spend all day yesterday troubleshooting and then it is something simple like this

thunder07337

Yes, that will happen more often 😉

wambamitsbram

i cannot save these settings

wambamitsbram

i think something is wrong with the wireless LAN because when i disable it it does work

wambamitsbram

wait nvm reinstalling imager fixed it

wambamitsbram

thanks <@379464606835539971> and <@1187039958561726494> and <@796000224690307072>

wambamitsbram

it worked oncei was on my main wifi

wambamitsbram

i can now ping my pi with my laptop

wambamitsbram

f*king finally

alphabeta.

oh damn 😄 congrats

wambamitsbram

Yeah finally figured it out and thanks again for all the help you gave me

alphabeta.

I didn't even know you could use a guest network 😮

wambamitsbram

Nice we both learned something