Among others, the following solutions seem interesting to easily SSH into the RPi:
* Configure the RPi to advertise its hostname with Zeroconf (e.g. using avahi-daemon). The hostname can be modified from its default to prevent ambiguities.
* Configure the RPi to advertise itself on a DynDNS service.
* Configure the RPi to send an email to a predetermined address once its network interface is up.
However, none of them are actionable out of the box, and they require some packages to be installed on the RPi in order to work. You can however [https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=79151 push your Pi's IP to your computer/phone on boot], or note down your Pi's MAC and then scan with nmap/[https://play.google.com/store/apps/details?id=com.overlook.android.fing Fing] to find it, or even scan the subnet without your Pi connected, and then again with your Pi connected (then look at the difference between the two scans to see where your Pi is).
== Existing solutions ==
All those solutions are however too complex for a simple installation, and do not allow to easily understand what is happening under the hood. The aim of this article is to only install a standard Raspbian distribution and configure it such that it can be SSH'd into without hassle to complete the installation.
The <code>raspi-config</code> tool (available out of the box) is usually used to do part of this initial configuration, but it must be used interactively so it is not fit for our purpose. Another similar tool, <code>[https://github.com/shamiao/TRUNCATED-raspi-autoconfig raspi-autoconfig]</code> is a non-interactive pendant of the former, and might be useful for our purpose.
== Prerequisites ==
Although optional, it could be nice to already prevent anyone except you to access the RPi through SSH. In order to do this, even before putting the SD card into the RPi, you can already configure sshd to authorize only access using SSH keys.
Assuming you already have an SSH key pair on your running computer, you just have to authorize your key (paths are relative to the SD card root <code>$SD</code>, NOT is the root directory of your file system root <code>/</code>SD card):
<pre>
Assuming that you have a Zeroconf client (e.g. Avahi, Bonjour) on the machine you will use to SSH into your RPi, it would be nice to be able to use it to automatically resolve the IP address of your RPi. If both your computer and the RPi are on the same LAN (Zeroconf does not work across LANs), it would allow to use the hostname of your RPi instead of its IP address.
The problem is that there is no Zeroconf client in the default Raspbian installation, so it will have to be bootstrapped using the script above. Simply replace the "your code goes here" section line by the following:
<pre>
Basically, you have to install a DynDNS client on your RPi using the same technique as above and configure it according to the requirement of the DynDNS service you use.
As an example, using OVH's DynDNS service you can install <code>ddclient</code> on your RPi by replacing the "your code here" section line of the script above with:
<pre>
</pre>
''Note: if you have not guessed it already, you have to adapt the values for ''<code>login''</code>, ''<code>password'' </code> and the domain name to match your case, and the values above are fictional.''
=== Sending a mail ===