element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Raspberry Pi Zero W: Can't connect to SSH no matter what
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 9 replies
  • Answers 4 answers
  • Subscribers 664 subscribers
  • Views 5162 views
  • Users 0 members are here
  • raspberry pi zero
  • ssh
Related

Raspberry Pi Zero W: Can't connect to SSH no matter what

pathfider1998
pathfider1998 over 7 years ago

This is a very long story, so I will try to keep it as short as possible.

 

1. I got RPi 0 W.

2. I installed Raspbian Stretch Lite, the one straight from official site.

3. I realized that mini HDMI converter hasn't arrived yet, so I decided to go headless. This is going to be a server, after all.

4. Here's where the trouble began -- no matter what I do, I couldn't get the RPi0 to connect to Wi-Fi.

5. So I tried network interface thing (involving those two lines: dtoverlay=dwc2 on config.txt and  modules-load=dwc2,g_ether on cmdline.txt, following guide from https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a )

6. Installed Bonjour Print Service as instructed

7. When it worked, it did show up as network device under the name Network Gadget with some more words in front of it, and it required installation of generic driver from Microsoft Corporation

8. I could ping to raspberrypi.local, but no matter what I try, it always ended up with "Connection refused" error when trying to connect to port 22 when ssh-ing.

9. Now it doesn't work at all, the device never shows up but the ACT LED is still on and flashes away as boot process continues (each tries were done after waiting longer than 90 seconds to ensure boot process is done)

 

Here's the content of each config files, including "wpa_supplicant.conf" file.

config.txt

<snip, content identical to stock file>

dtoverlay=dwc2

 

cmdline.txt:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=37665771-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether

 

wpa_supplicant.conf:

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

update_config=1

 

network={

    ssid="********"

    psk="********"

    scan_ssid=1

    key_mgmt=WPA-PSK

}

 

I do have "ssh" file without extension and content in the drive called root, along with config.txt and cmdline.txt as they told me to do. They were there before first boot.

What went wrong here? Please help!

  • Sign in to reply
  • Cancel
Parents
  • pathfider1998
    0 pathfider1998 over 7 years ago

    Okay, after some experimentation, here's the result:

     

    1. RPi fails to copy wpa_supplicant.conf to its internal storage (ext4 partition on SD card)

    2. SSH enabler script runs but does not detect the file, thus it terminates on its own

    3. Kernel panic occurs

    4. SD card data is corrupted beyond repair, thus system enters panic mode

    5. It tries to dismount /boot/ and miserably fails

    6. System halts

     

     

    I'm starting to suspect my Pi is cursed and does not want to cooperate at all.

    I'm now trying my final solution, PIbakery. If this fails too, then... I don't know anymore.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • pathfider1998
    0 pathfider1998 over 7 years ago

    Okay, after some experimentation, here's the result:

     

    1. RPi fails to copy wpa_supplicant.conf to its internal storage (ext4 partition on SD card)

    2. SSH enabler script runs but does not detect the file, thus it terminates on its own

    3. Kernel panic occurs

    4. SD card data is corrupted beyond repair, thus system enters panic mode

    5. It tries to dismount /boot/ and miserably fails

    6. System halts

     

     

    I'm starting to suspect my Pi is cursed and does not want to cooperate at all.

    I'm now trying my final solution, PIbakery. If this fails too, then... I don't know anymore.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Robert Peter Oakes
    0 Robert Peter Oakes over 7 years ago in reply to pathfider1998

    Are you using a no name sd card by any chance this could cause all these

    issues and more

     

    I have done this numerous times with the pi zero and never had these

    issues. The only issue I had was with stretch and when I put the card into

    a pi 3 it worked just fine

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • pathfider1998
    0 pathfider1998 over 7 years ago in reply to Robert Peter Oakes

    I was using SanDisk card which was a known good card, but apparently Pi hated it.

    I swapped it for Samsung card and used Jessie instead of Stretch. And it works.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube