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
  • Robert Peter Oakes
    0 Robert Peter Oakes over 7 years ago

    Also those instructions on github are for a pi zero, not a pi zero W and is attempting to get the PI to connect via the USB port by having it pretend it is an ethernet port. you dont need to do that with the PI Zero W, just do what I suggested with Raspian, not Stretch and it should work

    • Cancel
    • Vote Up 0 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'm currently not at the workshop so that would have to wait for few hours, but thanks for helping!  I will try your solution once I go there. Everything sounds so similar to each other it's confusing my rusty brain. Also, that thing which sounds like a separate drive but is technically a folder and so on... whew.

    (Silly me, I could have brought RPi here and used the good 3 hours I have between the class starts to fix this issue for good!)

     

    p.s. Windows simply does not detect ext2 partition so even if you try to format it, you can't do that directly, nor Windows will ever warn you of unknown partition type ("You need to format this disk" dialog). You have to use partition manager to erase the partition manually if you want to reuse your card for something else!

     

    EDIT: Used composite output to see the log, it seems like that whatever happens after it tries to copy "wpa_supplicant.conf" file throws everything off the sequence and it's trying to unmount /boot/ but it fails miserably.

    EDIT: It seems like Raspberry Pi decided to throw pies at SD card instead of writing data normally, thus corrupting ext4 partition beyond repair, wrecking the entire boot process.

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

    I'm currently not at the workshop so that would have to wait for few hours, but thanks for helping!  I will try your solution once I go there. Everything sounds so similar to each other it's confusing my rusty brain. Also, that thing which sounds like a separate drive but is technically a folder and so on... whew.

    (Silly me, I could have brought RPi here and used the good 3 hours I have between the class starts to fix this issue for good!)

     

    p.s. Windows simply does not detect ext2 partition so even if you try to format it, you can't do that directly, nor Windows will ever warn you of unknown partition type ("You need to format this disk" dialog). You have to use partition manager to erase the partition manually if you want to reuse your card for something else!

     

    EDIT: Used composite output to see the log, it seems like that whatever happens after it tries to copy "wpa_supplicant.conf" file throws everything off the sequence and it's trying to unmount /boot/ but it fails miserably.

    EDIT: It seems like Raspberry Pi decided to throw pies at SD card instead of writing data normally, thus corrupting ext4 partition beyond repair, wrecking the entire boot process.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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