mccpi
Posts: 34
Joined: Sat Jun 16, 2018 5:16 am

ssh .... I became a little headless..

Mon Jun 18, 2018 5:34 pm

Hi,

(I am using Gentoo Linux on my PC.)

since I dont want to bind my little mobile computer (Pi Zero W) with a thick HDMI cable to my comparable fat and heavy
monitor, my plan is too usw X11 forwarding via Wifi.

I followed the instruction of this video:
https://www.youtube.com/watch?v=xj3MPmJhAPU
and got stuck in that moment when I should ssh into my Pi:

ifconfig gave me an additional IP-address, when the Pi is connected via
USB to my PC.
I did a
[email protected]<ip-address>
and got back a
password:

I entered several reincarnations of 'raspberry' and had no luck.
I searched this page:
https://elinux.org/R-Pi_Troubleshooting ... h_in_to_Pi
chapter "Passwords" which points me to the download page on
which I didn't find a single password.

Hmmmm....

I /think/ ssh working: I got a password prompt.
But I failed to login...

Any help would be very appreciated... ;)

Thanks a lot in advance!
Cheers
Meino

User avatar
The Traveler
Posts: 363
Joined: Sat Oct 21, 2017 3:48 pm

Re: ssh .... I became a little headless..

Mon Jun 18, 2018 5:45 pm

First things that come to mind, did you set up your keyboard in raspi-config under Localization and/or is your Caps Lock key on?

Cheers.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

fbe
Posts: 540
Joined: Thu Aug 17, 2017 9:08 pm

Re: ssh .... I became a little headless..

Mon Jun 18, 2018 6:03 pm

You could use passwordless ssh https://www.raspberrypi.org/documentati ... ordless.md.
As you use Linux on your PC, you could plug the SD card into your PC, mount its root partition and copy your public key to home/pi/.ssh/authorized_keys on this partition instead of copying it via network.

tpyo kingg
Posts: 640
Joined: Mon Apr 09, 2018 5:26 pm
Location: N. Finland

Re: ssh .... I became a little headless..

Mon Jun 18, 2018 6:43 pm

When burning the SD card you could touch the file "ssh.txt" in the /boot partition to ensure that the SSH starts when you boot. Then in the /rootfs partition add your public key to the authorized_keys file, one key per line / one line per key. If you are in a hostile network you might also edit the sshd_configuration in the /rootfs partition to disallow passwords even before booting for the first time.

Code: Select all

PasswordAuthentication no

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: ssh .... I became a little headless..

Mon Jun 18, 2018 6:50 pm

Hi mccpi,
You are sure that using the correct rpi0 ip?
Is not clear if you ssh attempt done using wifi or usb tethering.
On case of usb, you are not using PC ip? Check auth log or IDS on gentoo.

mccpi
Posts: 34
Joined: Sat Jun 16, 2018 5:16 am

Re: ssh .... I became a little headless..

Tue Jun 19, 2018 3:27 am

Hi,

all my current attempts failed.
I listed the available IPs via ifconfig before and after connecting/booting the Pi0W.
I get a password prompt but cannot login.

The little thing makes me a great headache.

The last I treid was Adafruits tutorial, since it was the newest I could found:
https://cdn-learn.adafruit.com/download ... eation.pdf

I can't see any WiFI activity. Neither with my tablet nor via my Fritz!Box WiFi Monitor.
Is this thing damaged?
Looking via HMDI onto the Pi0W the boot process seems to be clean. I ends with a prompt
on the console (I am using the "Lite" version of Rapsberian Stretch)
I dont own a Bluetooth enabled keyboard (IBM model M...) and the Bluetooth on my tablet is damaged.

Do I really need an UART connection to get into that thing?

Why there is no Wifi signal?

How delicate is this tiny tiny mini micro nano femto atto antenna ?
Is it ssh or ssh.txt what I need to put into boot?

Is it possible, to create a (later removed again) "totally unsecure" connection to the pi0w...
via usb and telnet for example -- only to circumvent possible sources of even more headaches?

A lot of question pulled in by that tiny thing.

Cheers
Meino

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: ssh .... I became a little headless..

Tue Jun 19, 2018 12:25 pm

Hi,
I think, you are making some confusion.
After re-read you original post, watch linked video, some google search.
Video is about using windows as host. Not Gentoo Linux.
You not have access to rpi0w, yet.
If you run a ifconfig, it can be done only on Gentoo Linux.
ifconfig is returning gentoo ips, not rpi0w ip.
I guess, You trying to ssh own linux, try some user and password of gentoo.

If you have installed and configured mDNS/Avahi (most actual system have it installed as part of networkmanager), use local mDNS name of device to connect.
ssh [email protected]

I don't have any RPi with WiFi (or access to any RPI at moment). But, you need to configure WiFi connection parameters to bring it up.
create a file callled wpa_supplicant.conf on sd card boot partition (same place that have config.txt, cmdline.txt, etc), with this content:

Code: Select all

network={
    ssid="YOUR_NETWORK_SSID_NAME"
    psk="YOUR_NETWORK_SSID_PASSWORD"
    key_mgmt=WPA-PSK
}
Replace YOUR_NETWORK_SSID_NAME and YOUR_NETWORK_SSID_PASSWORD to match to you wifi router settings.
Check WiFi router dhcp client list to find RPI0 leased ip.

Or give us more details that you done.

mccpi
Posts: 34
Joined: Sat Jun 16, 2018 5:16 am

Re: ssh .... I became a little headless..

Tue Jun 19, 2018 4:32 pm

Hi,

(everything done with GENTOO Linux, Wifi is via Fritz!Box 7490)

ok, I have resetted everything to factory settings:
Downloaded Rapsberian Stretch Lite, dd the stuff to a 16GB Samsung SDcard.
The card is ready.

What I want as a final state is a Pi0W, in which I can login via my tablet and Wifi.
I have no access to bluetooth technology currently.

Since I read different tutorial saying different things I tried different way to get into
that little beast, which failed.

Currently a new kernel is compiling to support avahi, which I had installed before.

Suppose the new kernel and avahi are configured, compiled and up and running ... what next?

Thanks for all your patience! :)

OK, postedit: This will not work...since the access point is my Fritz!Box.
So, I need something like avahi on my tablet.
But...before we will got there...
There should be visible the SSID of the PZ0W on the Wlan list on the tablet....
Isn't it?

Therefore: The RPZ0 should be configured as Acess Point?...

Oh damn...WLAN is a blank sheet for me...sorry...

Cheers!
Meino

---------------------------------------

I did:
Mounted the sdcard on my Linux via sdcard reader.
created an empty file 'ssh' in the boot partition.
Also there I created a wpa_supplicant file, with the contents given
previously in this thread (*THANKS!*) with changes of SSID and
password.
Unmount the sddcard
Insert the sdcard into the RPI0W.
Connected the usb cable to the PWR input and booted
the RP0W.
Wait
Wait
Wait.
Started my tablet to see the list of activ WLAN spots.
Nothing,

Hmmmmm....

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5201
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: ssh .... I became a little headless..

Tue Jun 19, 2018 7:12 pm

Having (re-)read this thread: @mccpi can you confirm, are you trying to connect directly to your headless Pi via WiFi from your tablet etc. and not, as is more often done, via a WiFi-enabled router? If that's the case then, AIUI, there's more "things" to set up on the Pi (as an Access Point or similar, I think, 'tis not something I've done**) which probably need another type of "headless" connection (eg. a USB-to-3.3V-serial connection to the Pi) or, a "non-headless" (ie. keyboard, mouse & display) temporary setup. AFAIK, most of, if not all, the "semi-automated" headless setup "tutorials" presume that it's the Pi wanting to be connected to a WiFi router (or access point).
Trev.
** On the rare occasion I wanted to connect directly in a "networked" way to a Pi (ie. not via a router/switch and/or WiFi) I used this "old method" (since I happened to have a suitable cable):
http://www.cpmspectrepi.uk/raspberry_pi ... Cable.html (and, for a P0, A+ or A, one of these too: http://www.cpmspectrepi.uk/raspberry_pi ... pters.html )
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

mccpi
Posts: 34
Joined: Sat Jun 16, 2018 5:16 am

Re: ssh .... I became a little headless..

Tue Jun 19, 2018 8:08 pm

Hi,

my final goal is to be able to connect to my RP0W with my tablet. This implies an access point on the RB0Z, yes.

In the meanwhile I got access to my RB0Z via good old fashioned UART and a serial console. Man, this works at least.
Anything does not.

I configured Wifi with raspi-conf.
After reboot the only line in the dmesg mentioning Wlan is:
[ 18.609360] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Am I in trouble here?

Supose this would be what it should be....

My setup is:

Linux PC--->(LAN cable)--->Fritz!Box with WLAN----(DSL-cable)------(x)(wall)
|
usb-power
|
V
RPZW with Wlan

The Linux PC has avahi installed and configured. Whether this works or not...dont know.

Where in this net I could get a glimpse of indication,that the Wifi is working on my RPZ0?

Cheers
Meino

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: ssh .... I became a little headless..

Wed Jun 20, 2018 11:09 am

Hi Meino,
Raspberry Pi Zero is configured as client, like any other wifi client devices, you can not see it on WiFi connection list.
Application like finger for android can scan wifi network and list the network devices on network.
Can verify on you Fritz!Box if have a wifi association or dhcp leased for raspberry pi.

At boot time are normal see some error like "[ 18.609360] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready", some sub system is tried to configure wlan0 before the are read.

Return to “Beginners”