Direct Network Connection Between Windows PC and Raspberry Pi

151,420

113

49

About: Engineer. Educator. Entrepreneur.

Here's a simple method to connect to your Raspberry Pi through SSH from a Microsoft Windows based PC or Laptop.

All you need is :

1. A Windows based machine with an Ethernet adapter
2. An Ethernet cable (a normal patch cord or a crossover cable - both work)
3. A Raspberry Pi Model B

Unlike most of the other methods described online, you do not need to :

1. Use an Ethernet or WiFi router
2. Have a monitor or any display connected to the Raspberry Pi
3. Have a keyboard connected to the Raspberry Pi
4. Edit any files on the Raspberry Pi's SD Card


Here's how to proceed.

1. Download DHCP Server for Windows. It is a 100kB download available here.
2. Go to the IPv4 properties page of the Ethernet adapter and set a fixed IP address, say 192.168.2.1
3. Run the DHCP Server Wizard (downloaded above)
4. Select the Ethernet adapter from the list shown
5. Save the configuration file and start up the DHCP Server
6. Click the 'Continue as tray app' button in the server control panel.
7. Boot up the Raspberry Pi
8. A popup notification shows the IP address assigned by the DHCP server to the Raspberry Pi.
9. Use a SSH client, like PuTTy, to connect to the IP address shown

Voila ! You are connected to your Raspberry Pi.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Raspberry Pi Contest

Participated in the
Raspberry Pi Contest

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    49 Discussions

    0
    None
    rabiach786

    Question 1 year ago

    In the Instructable above (Direct network connection between windows pc and RPi), I could not understand how can I get Raspberry pi out put shown in video (at the right corner) on my PC Screen. I have done all the steps for DHCP server and SSH (upto step 9) but I did not get any output of RPi on my windows screen.

    Another problem: Bash error received: rtmpdump command not found

    0
    None
    OscarHace

    2 years ago

    Hello,

    After a lot of trials, this way of connecting raspberry pi and my laptop works for me. I do not know the details of dhcp, or how to do it manually on windows 7 , but it works. Thank you for sharing the info.

    Thank you very much for the info.

    0
    None
    JaroslavK

    4 years ago on Introduction

    Is there some limitation causing that I'm not able to connect my RPiB+ over patchcord (directly connected to laptop) USING FIXED IP ADDRESS?

    I wanted RPiB+ to use fixed IP address instead of DHCP, so I set it; now it works when RPiB+ is connected to my local LAN over switch (and router), but when I connect it directly to my laptop (with accordingly changed IP address of laptop), it does not work!? I have already tried a lot of possibilities, but still no ping...

    Does RPiB+ remember previous MAC address of router, so after connecting laptop with other MAC address it refuses to connect? Or something else? Thanks for any idea... #J

    1 reply
    0
    None
    TheFireManJaroslavK

    Reply 2 years ago

    An older thread, but I'm posting some info for those who are reading this.

    "Does RPiB+ remember previous MAC address of router,"

    Simple home-type switches and routers do NOT use MAC or IP addresses.

    0
    None
    FedorG

    3 years ago

    Needed to disable firewall for ethernet connections and only then my B+ connected.

    0
    None
    AadarshK

    3 years ago

    can i also share pc internet on my pi via this method

    0
    None
    nasser3

    4 years ago

    what if my rasberrypi runs a windows 10 IOT??

    0
    None

    I have followed your instructions but get the following error:

    "Network error: Connection refused", when I try to run PuTTy.

    Please help.

    Thanks

    Alan

    0
    None

    Tried this but DHCP server still disabled & unable to obtain status from DHCP server.

    Any ideas ?

    Alan

    0
    None
    Pri_de

    4 years ago

    Thanks for the help :)

    0
    None
    knielen

    4 years ago on Introduction

    yay, thanks for the tutorial, after some attempts I got it running

    0
    None

    Fantastic start! Some extra info:

    You can connect the R.Pi to the internet by adding some routing info like this:

  • sudo ip route delete default dev eth0
  • sudo ip route add default via <windows box ip address>
  • 0
    None
    h3manth

    5 years ago on Introduction

    Its fine till step 7, but I did not get any pop-up notification. I've tried it twice and checked everything.How do I get it to work?

    4 replies
    0
    None
    nprasanh3manth

    Reply 5 years ago on Introduction

    hi h3manth, i'm not sure why the pop-up notification is not coming up. when selecting the ethernet adapter while installing the dhcp server, ensure that it shows the IP address you configured previously. If it is showing 0.0.0.0 next to the ethernet adapter, it may cause a problem.

    0
    None
    bhulsey1nprasan

    Reply 5 years ago on Introduction

    The IP address is showing 0.0.0.0 in the dhcp server, and you're right, it's causing a problem. I don't ever get a pop up. As far as I can tell I have my local area connection ipv4 set up correctly according to your video. I've tried several different IPs but it just keeps showing 0.0.0.0. How do I fix this?

    0
    None
    ealstonbhulsey1

    Reply 4 years ago on Introduction

    Hello bhulsey1,

    Did you get your problem solved. I am having the same problem. If you did get this fixed, could you tell me what you did?

    0
    None
    WeijianLealston

    Reply 4 years ago on Introduction

    Hi

    i experienced the same issue too. However, once i tried booting up the Rpi and connecting it to the laptop via the ethernet cable, then followed by setting up of DHPC wiz, the problem is gone.

    Hope that helps the rest who are experiencing the 0.0.0.0 issue.

    0
    None
    NeelimaS

    4 years ago on Introduction

    thank you!! worked for me ... as my raspberry pi address was in different network and my laptop was connected to different network, I had to set the gateway address equal to the ip assigned by dhcp to my laptop .

    0
    None
    PriyaG

    4 years ago on Introduction

    sir if i connect my raspberry pi to router of my pc with ethernet cable and use the steps of this in my pc will this post help me?