At home, I can connect my Pi to my router and find out the IP it gets assigned easily. Away from home, I would like to be able to connect to my Pi with a laptop and access it via SSH. I cannot setup a static IP as I am ultimately going to be connecting to it to public wifi.
Since my laptop isn't running a DHCP server when I connect the Pi defaults to a 169.254.x.x address. The only way I've been able to get that address is by plugging in a monitor.
Is there anyway that I can set what the default 169.254.x.x address will be? Or does anyone have any other ideas for finding out the Pi's IP address?
Thank you
Re: Set "default" IP address(not static)
Assuming you're using Raspbian Jessie you could try something like this:
(add it to /etc/dhcpcd.conf)
Change the IP address to what you need to connect to your laptop.
(add it to /etc/dhcpcd.conf)
Code: Select all
profile static_eth0
static ip_address=192.168.1.200
static routers=192.168.1.1
interface eth0
fallback static_eth0
Re: Set "default" IP address(not static)
That is perfect thank you!
I was able to change it so that it would work the default 169.254.x.x address that my laptop gets assigned:
I was able to change it so that it would work the default 169.254.x.x address that my laptop gets assigned:
Code: Select all
profile static_eth0
static ip_address=169.254.100.100
interface eth0
fallback static_eth0