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.

Müller
  • 227
  • 1
  • 4
  • 7
  • Your question is vague - describe the configuration. Is the Pi connected to a router? – Milliways Jun 13 '16 at 00: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 05: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](http://elinux.org/RPi_raspi-config#ssh_-_Enable_or_disable_ssh_server)), 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: https://www.raspberrypi.org/blog/another-raspbian-desktop-user-interface-update/. – goobering Jun 22 '16 at 09:46

4 Answers4

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.

YaddyVirus
  • 173
  • 1
  • 5
  • 19
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.

tlhIngan
  • 3,342
  • 5
  • 18
  • 33
  • 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

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.

BadgerTrucking
  • 485
  • 2
  • 7
  • 16
  • 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
  • @Aditya Ok, now try doing things wirelessly WITHOUT the ethernet plugged in. Let me know what happens. See, I have 3 pi 3's, and I have even switched networks several times, and all of the pi's have the same exact wlan0 IP address as they did with the other wireless networks. – BadgerTrucking Jun 21 '16 at 16:46
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/41460/discussion-between-aditya-and-badgertrucking). – Müller Jun 21 '16 at 16:46
  • Steps 1, 2 and 3 are completely unnecessary to solve the problem. The only thing required is to configure the WiFi to connect to the router and either allocate a fixed IP from the router or to set a fixed IP on the RPi (in the range that won't be allocated from DHCP by the router: many routers allow configuration of the range of IP addresses that can be allocated within the subnet being used). Once the (connected WiFi) IP address of the RPi is known then SSH to the WiFi IP address is possible. – Charemer Oct 02 '17 at 12:10
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.

Gaurav Dave
  • 190
  • 1
  • 2
  • 14