1

I'm trying to control my Raspberry Pi from my computer using SSH, and for what I understand I need a ethernet cable to do so, from my computer port to my Pi's port. But on my computer I only have one port for internet/ethernet cable. So if I plug in an ethernet cable between these two computers I wont get an internet connections if I understand it correctly, how can I fix this?

Do I need a ethernet cable to when using SSH to controll from main pc, or can I use a ordinary internet cable?

And do the cable need to be directly between the two computers, or can I use a switch from my main internet cable, then use 2 internet cables, one to my main pc and one to my raspberry?

2 Answers 2

1

From your comments I take it that your PC is connected to the "Internet" by an ethernet cable running to your router. So if you already have a router that provides more than one LAN (Local Area Network) ethernet port - which most routers do - than you can simply connect your Pi with another ethernet cable and you're done. If the router does not provide more than one LAN port a simple switch can solve your problem. Other than that WiFi is also an option.

7
  • hey thanks for replying, Because i do not have space in my router for an extra input i was thinking about using my main cable with a switch with extra ports, then put 2 new cables from there. one to my pc and one to my Pi, do you think this will work?
    – Anton
    May 26, 2015 at 20:38
  • A switch will most likely work the way you describe. Connect the switch to the router, pc and pi. Just make sure that you plug the switch to the LAN port of the router - not the WAN port.
    – Ghanima
    May 26, 2015 at 20:42
  • If i plug it to the LAN port, will my main pc still have internet acces? so i can browse internet and such?
    – Anton
    May 26, 2015 at 20:47
  • If all goes well: yes. I mean, yeah, sure, that is the idea ;)
    – Ghanima
    May 26, 2015 at 20:53
  • okey thanks, i thought you had to have a cable directly between the pc and the Pi :) But if i use a cable from the router connected to the switch, then 2 other cables to the Pi then the Pc, then try to connect to the Pi through SSH with the Pi's IP wouldnt it have the same IP as my PC? or does every computer have its own ip address?
    – Anton
    May 26, 2015 at 20:56
1

You need to be able to ping the Pi from the computer you want to ssh from.

The actual connection does not need to be an ethernet cable. Wireless, bluetooth, serial, router, modem, switch, etc. will work as long as they can ping each other, i.e. they need to be networked.

4
  • I have a internet cable attached to my main computer, but not any cable attached to the Pi, how can i connect the Pi to the network? i tried with another cable from my Pi directly to the router, so i have 2 different cables, one to the main pc and one to the Pi, but i had no space for input.
    – Anton
    May 26, 2015 at 20:30
  • 1
    A wireless dongle is a popular method. The Ethernet cable to the router will work. It is not clear from your question that you have tried a cable between the Pi and router. Perhaps edit your question and mention what you have tried.
    – joan
    May 26, 2015 at 20:33
  • Is there a difference to Ethernet and Internet cable? and does it matter which one i use?, Because i do not have space in my router for an extra input i was thinking about using my main cable with a switch with extra ports, then put 2 new cables from there. one to my pc and one to my Pi, do you think this will work?
    – Anton
    May 26, 2015 at 20:36
  • 1
    The thing from the router to your pc is an ethernet cable. There is no such thing as an "internet" cable at least not in the sense you are refering to. A switch will most likely work the way you describe. Connect the switch to the router, pc and pi.
    – Ghanima
    May 26, 2015 at 20:41

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.