1

I have a Raspberry Pi 2 which I want to ssh into from my Windows 10 machine.

I attached the module to my laptop using an ethernet cable. I saw that the IP was configured automatically to 192.168.137.1. Connecting to this IP from Putty resulted in Connection Refused.

Then I added ip=192.168.3.14 to cmdline.txt and I then booted from the SD card but now I get Connection Timed Out:

F:\>ping 192.168.3.14

Pinging 192.168.3.14 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.3.14:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

Is there anything else that I need to do for this?

5
  • As I understand from your question (which is lacking detail) you are using a Windows machine to provide ICS to the Pi. This would be OK, but you can't then use the same connection to connect to the Pi.
    – Milliways
    Oct 27, 2016 at 5:12
  • My main aim is to be able to ssh into Pi from my windows machine. Oct 27, 2016 at 5:15
  • Well plug it into your router. You need to describe your setup for anyone to give you sensible help.
    – Milliways
    Oct 27, 2016 at 5:17
  • whats the IP address of your windows 10 machine ? both need to be in the same subnet for them to see each other. Oct 27, 2016 at 5:52
  • Have a look over here. As the articles suggests, it used to be a rather complicated process, but now direct ethernet connection has been automated. So you normally shouldn't have to assign explicitly an IP and I believe by doing so, you might be messing up thing more. It is just a matter of finding the correct Raspberry Pi IP.
    – DimP
    Feb 7, 2017 at 12:46

2 Answers 2

2

192.168.137.1 (which I assume is the IP of your Windows computer) and 192.168.3.14 (which you configured on your RPi) are not in the same subnet, that's why the connection cannot be established.

Try setting the RPi IP address to e.g. 192.168.137.14 and try again.

2
  • 1
    I changed to that IP and tried again but there was a Connection Timeout again. Then I tried ping raspberrypi.mshome.net on windows and I got 192.168.137.155 to respond and I was able to connect to it using Putty. Do you think this is right? Oct 27, 2016 at 6:34
  • I wouldn't expect any other devices in your network to support SSH (even less to accept RPi login), so if you got it connected then it is right. I'm not sure why the IP from cmdline.txt was ignored, but I never configured it that way. Perhaps windows 10 provided 192.168.137.155 via DHCP and it was used instead. Oct 27, 2016 at 6:43
0

In my case, my Windows machine is on 192.168.2.x and it connects through the WAN port to an extender router on 192.168.1.x where my Internet gateway is located at 192.168.1.1

I connected the Rpi3 to the extender router's LAN and it has the address of 192.168.1.202

My Windows machine is 192.168.2.205

Remote Desktop Connection gets me to get the Xterm desktop window, and PuTTY works as well for character-based access. FileZilla also works well - selected SSH login and put in my login name and password.

SSH is enabled on the Rpi3 so the first connection with both PuTTY and FileZilla prompts me to save the keys as I declare it a trusted host.

Upvote on your comment to the first answer. Sounds like you found the right solution.

I also use the same setup to access my hosting service at Bluehost. It seems that SSH has no problem passing through the routers in that direction.

When the Rpi3 is on my other subnet (router) of 192.168.3.x I can't see it at all from my Windows machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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