2

I want to SSH into my Pi3 Model B using WiFi. As of now, my Pi works over Ethernet to my laptop. But when i disconnect the Ethernet cable, and try to login using my Pi IP using PuTTy nothing happens. Not even the user name password appears. Is there a comprehensive guide for setting up this on a Pi3 ? I have Raspian Jessie image on the Pi. Also, the booting of the OS is done through a USB drive. On my laptop, I have Windows 10 installed. I don't have a monitor, keyboard and mouse.

  • Your question is vague - describe the configuration. Is the Pi connected to a router? – Milliways Jun 13 '16 at 0:27
  • My Pi is connected to my laptop over an Ethernet cable. My laptop is connected to the Internet. I think by default, the Pi3 has some in-built WiFi adapter which "works by itself" when turned on. My aim is to SSH into my Pi using WiFi and not the ethernet cable. In my router login page, I can see the IP and MAC of my Pi but i am not able to login using Putty because nothing appears. Not even the standard username and password prompts. – Müller Jun 20 '16 at 5:56
  • The Pi 3 does indeed have its own built in WiFi and Bluetooth adapter. There are many things that could be going wrong here - you may have SSH switched off (see: raspi-config/SSH), or I suppose it's possible that you're still trying to use the ethernet adapter IP for SSH, rather than the WiFi adapter IP (they'll be different). If you haven't yet input your network SSID and password then you haven't set up WiFi properly - see: raspberrypi.org/blog/…. – goobering Jun 22 '16 at 9:46
1

Ok my friend... First of all, youre going about it all wrong. There was no reason at all to issue a static IP to your pi. The wlan0 IP address would have done just fine. Not sure why you want a static IP address... However, here what I suggest... You're attempting to run a pi headless... But it ain't working correctly. Do this:

1) reinstall the image... Better to be on a micro SD card. But if a flash drive is all you have, I suppose that will work.

2) it is my understanding that you can SSH over ethernet... Well, here's a way that you can at least see the "screen" of your pi... Use Windows remote desktop. Before you do this though, SSH over ethernet using putty and execute this command sudo apt-get install xrdp. When the install gets done, use Windows remote desktop to see your pi's desktop.

3) after accessing your pi's desktop, ensure the wireless adapter is turned on. If it is then log into your wireless network.

4) after you successfully login to the wireless network, type ifconfig into the terminal. Take note of the wlan0 IP address. DON'T MESS WITH IT UNLESS IT IS A CONFLICTING (another device assigned) IP ADDRESS.

5) Now unplug your ethernet cable and attempt to SSH over wlan. You will still be able to use the remote desktop with wlan as you were with ethernet. It may disconnect when you make the ethernet to wlan switch, but that's OK. You can always remote desktop again lol.

This should work for you. Admittedly, I've never been forced to do this as I have the necessary equipment as to avoid this. I certainly hope this helps. Let me know if it does.

  • I thought the router assigns a new IP to the Pi everytime it connects to the network. How do I ssh using Putty if i do not know what is the IP that the Pi has when in network? I do not have access to the router login page to see IP of the Pi. – Müller Jun 21 '16 at 15:37
  • @Aditya, you said you can access the pi through ethernet yes? – BadgerTrucking Jun 21 '16 at 15:47
  • Yes, When i connect Ethernet cable between Laptop and Pi, it works. – Müller Jun 21 '16 at 16:24
  • @Aditya, OK... Are you getting Internet over ethernet? – BadgerTrucking Jun 21 '16 at 16:28
  • Ok i removed my static IP and tried again. I opened up Remote connection and enabled Wifi through my desktop. I then ran ipconfig and got the IP with which my Pi is connected to the router. Then I logged out and then logged in with that IP using Putty after disconnecting the Ethernet cable. Since, everytime I boot, the IP is different, I thought maybe setting a static IP would be the way to go. – Müller Jun 21 '16 at 16:40
2

If I'm not mistaken, you have set the static IP from the router configuration page.
I did the same so I'll tell you what worked for me -

Disconnect your router from the internet, just plug out the WAN cable or disconnect from the router config page.
Then try sshing into the Pi using the IP address you assigned, it should work (it did for me).

After that, you'll be able to ssh into the Pi even when your router is connected to the internet.

I tried this and it has worked for me. I had the exact problem as you.

Hope this helps.

EDIT :
If this fails, try connecting your laptop via LAN to your router and then sshing into it.

1

WiFi and Ethernet have different IPs. If your Pi is connecting to your router using WiFi, your router can tell you what IP the Pi has, or use a network discovery tool from your laptop. To make that IP static, look at this related question.

  • 1
    I have gone into my WiFi router login page and I see that the Pi is connected to WiFi using the static IP that I have set on the wlan0 in the wpa_applicant.conf file. But still i cannot ssh into pi. even the login and password section does not appear on Putty. – Müller Jun 19 '16 at 15:11
1

First thing you have to do is, check if you're able to access internet without connecting to Ethernet cable. Connect it with HDMI cable to see the GUI.

If you are able to access internet then, in your terminal write ifconfig and see what is the IP address against wlan0. Use that login via SSH.

If you're not able to access internet, then you've to add ssid and password to connect your PI with WiFi, then again see the IP address and connect.

Assigning a Static IP is overkill, unless and until you want to access it remotely, even in that case you've to implement port forward in your router's setting.

  • Sorry this is not an option for me to test. I dont have a monitor nor an HDMI cable. – Müller Jun 21 '16 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.