setting raspberry pi 4

December 16, 2023, 13:10

KUTCHINI

Hello guys, I'm trying to set up a raspberry pi 4. My setup is headless. I don't set up a wireless lan connection. When I connect the lan cable between my laptop and the raspberry pi I try to open ssh with putty, and it couldn't find the host

null

A cross cable is required for such a connection.

KUTCHINI

It is a cross cable, I already made a connection, but since then I couldn't do anymore, so I loaded a new os and tried again, it's not working

null

Hostname and co entered correctly? Have you tried SSH via the console?

null

SSH also switched on in the imager?

KUTCHINI

Yes I tried pi@raspberrypi.local and raspberrypi.local at putty, both don't seem to work.ssh enabled at imager

KUTCHINI

Thank you for trying to help btw

null

Have you tried SSH via the console?

KUTCHINI

havent tired yet, how do i do this?

KUTCHINI

currently download a new OS, imager 1.8.3, rpi4, bookworm 64bit with desktop. hostname: matanpi.local username: pi password: no wireless LAN SSH ON in the imager should I add a ssh file in the SD card?

null

This will cause problems, as far as I know bookworm is not optimized for Pi 4. No, but try an SSH connection via the console/terminal instead of PuTTY.

KUTCHINI

ok so i changed for bullesye OS 32 bit.

null

No 64bit

KUTCHINI

bullesye 64bit?

null

Yes

KUTCHINI

ok. how i do ssh connection via terminal?

null

Windows=CMD Mac= don't now

KUTCHINI

just type in cmd ssh pi@matanpi.local?

null

No Open CMD then ssh

KUTCHINI

C:\Users\mtnda>ssh usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] destination [command] C:\Users\mtnda>

KUTCHINI

thats what I see when I type ssh

null

ssh pi@matanpi

KUTCHINI

could not resolve hostname matanpi. no such host is known. only green led at the rpi4. is it fine?

null

Only green LED on the Pi? No red one? Hmm strange, maybe it would be better to connect the Pi to LAN instead of directly to the laptop. I don't know how it works with IP without DHCP. I haven't tried that yet.

KUTCHINI

ok so I have a PC connceted to LAN. I connected the rpi4 to LAN too. now I guess I need to ssh via my PC

KUTCHINI

Btw, both leds are on now

KUTCHINI

cant ssh it

null

Did you just reconnect the cables or restart the Pi?

KUTCHINI

I restart the Pi and connected it with ethernet cable to the router

null

Can you look into the router, if so see if the Pi appears there.

KUTCHINI

No, sadly I cant connect to it because I dont remember the username and password, but I can look with Advanced IP Scanner

KUTCHINI

Cant find any product with raspberry as the manufacture

null

I don't know of any router that displays manufacture... Unplug the Pi, see which IPs are left and then plug it back in. Then you can see which IP is added. How did you just set it up and have already forgotten your name and password?

KUTCHINI

I was trying few days so set it up. and suddenly I typed in putty pi@matanpi.local and it works. went to sleep, saw the raspberrypi with only red led. and couldnt enter it via ssh again...

KUTCHINI

well, I see the Pi at the network with IP 192.168.1.172

KUTCHINI

when I try ssh 'IP' -connect to host 'IP' port 22: Connection timed out

KUTCHINI

OH thats new:

KUTCHINI

The authenticity of host '192.168.1.172 (192.168.1.172)' can't be established. ED25519 key fingerprint is SHA256:ea+RMquFXO8zRSU+TFjEgLt+5JUh6lkguPTl78pqRvA. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])?

null

Yes SSH always requires ssh username@hostname Or ssh username@ip

KUTCHINI

well, I enterd the password and then it sayed - Connection closed by 192.168.1.172 port 22

null

How exactly did you establish the connection now?

KUTCHINI

i typed in the CMD 'ssh 192.168.1.172'

KUTCHINI

then it asked my yes no or finger print. I sayed yes

null

SSH always requires ssh username@hostname Or ssh username@ip

KUTCHINI

well i tried it no ssh pi@192.168.1.172

KUTCHINI

i entered the password and it says, permission denied please try again

null

Have you set the Pi as a user in the imager? You just said that you forgot your username and password...

KUTCHINI

what do you mean as a user? yes i set username and password. with username being pi and password rotempi

KUTCHINI

btw when I try ssh pi@matanpi Its not working either

null

Try it with another user.

KUTCHINI

which user?

KUTCHINI

I tried login with the laptop. Not working as well ><

null

You can choose your username as well as the hostname.

KUTCHINI

OK I will BOOT again Raspberry PI OS Legacy 64 bit, hostname: pitry.local username: matan password: matanpi Is it fine?

null

Yes

KUTCHINI

the Pi is on, both LEDs are on, same IP 192.168.1.172

KUTCHINI

i try ssh matan@192.168.1.172

KUTCHINI

ssh: connect to host 192.168.1.172 port 22: Connection timed out

null

How long has it been running? The system takes a few minutes to install.

KUTCHINI

around 5 minutes

null

ssh matan@pitry ?

KUTCHINI

ssh: Could not resolve hostname pitry: No such host is known.

KUTCHINI

well I reconnected the Pi to the network and now he ask again ye/no/fingerprint

KUTCHINI

and i'm in!

KUTCHINI

Thank you! I guess i need vnc now

null

VNC does not work with headless! VNC is for GUI installations.

KUTCHINI

why not? VNC is just connecting to the PI and visualizing the desktop

null

Headless = No Desktop! But you can try PuTTY again.

KUTCHINI

But I installed rpi with desktop

null

At first they said headless... That's why I assumed that now...

null

Yes then vcn works, but no idea how to set it up now. I only work headless.

KUTCHINI

Yes by headless I meant not monitor, sorry 😛 Anyways, Much thank you sir !

KUTCHINI

I restart the Pi and now only red LED is on, what does it indicate?

null

That the Pi has nothing to do that would cause the green one to light up. As long as it can be reached via ssh or vcn, it is irrelevant whether the green one is lit or not.

null

By the way, with Linux headless always means without GUI. So be careful when using this word.