Yes, that should work. You need 1 ethernet port on your Raspberry Pi and 1 ethernet port on your PC to connect your Raspberry Pi to your laptop. You can use a USB to ethernet cord when you don't have an ethernet port available.
- If you have a Raspberry Pi 3 B and a laptop with an available ethernet port, just connect those with an ethernet cord, no need for USB to ethernet cords.
- If you have a Raspberry Pi without an ethernet port and a laptop with an available ethernet port, you need 1 USB to ethernet cord for the Raspberry Pi.
- If you have a Raspberry Pi without an ethernet port and a laptop without an available ethernet port, you need 2 USB to ethernet cords, 1 for the Raspberry Pi and 1 for the laptop.
To set up SSH on a fresh install of Raspbian:
- Use a keyboard and display, run
sudo raspi-config
and set up SSH from there.
- Alternative method (when you have no keyboard or display): make a file called
ssh
in the /boot/
directory of Raspbian before you boot your Raspberry Pi.
I should also mention that some people are using SSH over USB for the Raspberry Pi Zero (without using WiFi or ethernet). This is done by enabling "gadget mode" on the Raspberry Pi Zero, allowing the Raspberry Pi Zero to become both host/slave over USB.
ssh
access to the Pi, NOT BOTH. – Milliways Mar 14 '17 at 1:41