OJFord
Posts: 2
Joined: Tue Feb 28, 2012 4:21 pm
Contact: Website

SSH directly over ethernet?

Wed Nov 07, 2012 10:25 pm

Hi, I'm, trying to connect to my RPi using SSH, directly over Ethernet from my laptop.

I need to do it like this principally so that I can move between home and school independent of the networks. It will be more convenient at home, and I can't use the school network anyway (so I'd have to also plug in my own router..).

Any help appreciated, thanks.

rickseiden
Posts: 411
Joined: Thu Aug 02, 2012 12:21 pm
Location: Buffalo, NY, USA

Re: SSH directly over ethernet?

Thu Nov 08, 2012 1:33 am

In a nutshell, and this is as detailed as I can get, you need to do the following:
  • setup a static ip on your rpi
  • setup a compatable static ip on your laptop
  • use a crossover cable to connect the two together directly
  • SSH from your laptop to your rpi using the static ip address you setup in step 1.
There are 10 types of people in this world. Those that understand binary, and those that don't.

thogue
Posts: 131
Joined: Wed Sep 19, 2012 2:16 am

Re: SSH directly over ethernet?

Thu Nov 08, 2012 3:55 am

rickseiden wrote:In a nutshell, and this is as detailed as I can get, you need to do the following:
  • setup a static ip on your rpi
  • setup a compatable static ip on your laptop
  • use a crossover cable to connect the two together directly
  • SSH from your laptop to your rpi using the static ip address you setup in step 1.
A lot of network equipment nowadays is autosensing so crossover cable might not be needed.

You have a few other options, many of which could get you into trouble if you are not careful :P
1. Setup your laptop as a DHCP server, so that when you plug one device into the other, your laptop will give an IP address to the PI, this way the PI can also use the laptop for internet access. (You also could do this vice versa, having the Rpi give out ip address's via dhcp, probably wont play nice on your home network though, and internet sharing will be an issue. Also not easy to setup, and will require a second network adapter) tl;dr many operating systems have "internet connection sharing" which will setup this all for you
2. You could leave the default configuration for eth0 and setup a 802.11q tagging, (VLAN), and also configure the QTAG on your laptop, that way, also long as you dont plug into a switch that supports 802.11q tagging you will be able to use a static up on both devices to communicate regardless of what the Ip configuration is for both devices. (I did this at work for a while)

moolen
Posts: 3
Joined: Thu Nov 08, 2012 4:52 pm

Re: SSH directly over ethernet?

Thu Nov 08, 2012 5:10 pm

you may get a dynamic domain (e.g. from dyndns.org)
- they offer a client for linux (i havent tested it yet.. but when my pi arrives).
and dont forget to open the ports for ssh (standard is TCP22).
setup the ssh server on your pi and the client on your laptop.

you should then be able to access the pi via ssh. ("ssh rpiuser@dynuser.dyndns.org")

Return to “Beginners”