jordus10
Posts: 9
Joined: Tue Aug 16, 2016 7:58 pm

RPi ssh via Ethernet cable directly(solved)

Tue Aug 16, 2016 8:12 pm

Hello everybody,
I have got Raspberry Pi 3 model B with the latest Raspbian installed. How to configure the RPi that I will be able to connect RPi directly with Ethernet cable to my laptop and control the RPi on the laptop using ssh?
Thank you for replies.
Last edited by jordus10 on Sun Aug 21, 2016 4:42 pm, edited 1 time in total.

pcmanbob
Posts: 9467
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: RPi ssh via Ethernet cable directly

Sun Aug 21, 2016 1:22 pm

As there will be no dhcp to issue IP addresses to your laptop and PI all you need to do is set a static of fixed IP on both the Pi and your laptop.
to do that on your Pi https://pi-hole.net/faq/how-do-i-set-a- ... cpcd-conf/

you did not say what os you were running on your laptop.

all you need to make sure is that both address are in the same range
so if you set the PI to 192.168.1.141/24
set the laptop to 192.168.1.142/24

now when you connect the cable they will connect to each other.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: RPi ssh via Ethernet cable directly

Sun Aug 21, 2016 1:45 pm

..or just set up Internet Connection Sharing on your Windows Laptop and it will act as a basic DHCP Server !!
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

jordus10
Posts: 9
Joined: Tue Aug 16, 2016 7:58 pm

Re: RPi ssh via Ethernet cable directly

Sun Aug 21, 2016 2:29 pm

Thank you for all your replies. But I have a small problem with setting static IP addresses. In Windows(which is on my laptop) you must set ip address, subnet mask, gateway, DNS server and alternate DNS server. But on Raspbian you must set up ip address, routers and domain name servers. I don't know how to set up it properly, because there are different configuration names on Windows and Raspbian.
I'm using this tutorial: http://www.howtogeek.com/howto/19249/ho ... windows-7/ and this: https://pi-hole.net/faq/how-do-i-set-a- ... cpcd-conf/.
Thank you for replies
jordus10

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: RPi ssh via Ethernet cable directly

Sun Aug 21, 2016 2:37 pm

jordus10 wrote:In Windows(which is on my laptop) you must set ip address, subnet mask, gateway, DNS server and alternate DNS server. But on Raspbian you must set up ip address, routers and domain name servers. I don't know how to set up it properly, because there are different configuration names on Windows and Raspbian.
The way the IP address is set on the Pi includes the subnet mask as the /nn value on the end. A /24 means a subnet mask of 255.255.255.0 (in binary that is 11111111.11111111.11111111.00000000 or 24 1s and the rest as 0s).

"gateway" on Windows is "router" on the Pi.

"DNS server" and (optional) "alternate DNS server" on Windows is "domain name servers" on the Pi.

jordus10
Posts: 9
Joined: Tue Aug 16, 2016 7:58 pm

Re: RPi ssh via Ethernet cable directly

Sun Aug 21, 2016 3:14 pm

Thank you, rpdom. I think it's all I wanted to know. If there will be any problems, I'll write.

jordus10
Posts: 9
Joined: Tue Aug 16, 2016 7:58 pm

Re: RPi ssh via Ethernet cable directly

Sun Aug 21, 2016 4:42 pm

Yes! Solved! Working!
Thank you guys for all your posts!

Return to “Networking and servers”