Issue the following command on the server. home//.ssh/id_rsaĪppend the content of the clients id_rsa.pub to the authorized_keys of the server. $ ssh-keygen -t rsa -b 4096 -C will produce a private key and public key. When prompted for a passphrase, leave it empty. Set up public-key authentication using SSH In this guide, this computer will be referred to as the server, and the remotely deployed computer ( Raspberry Pi) as client. In order for the reverse remote SSH-tunnel to work as intended, you need a computer which is publicly accessible over the internet. Then, I came across the reverse remote SSH-tunnel as a solution.Ī note of caution: Careless configuration of the reverse remote SSH-tunnel could let it act as trojan horse to the network it is configured in, which poses as a danger should it fall into the wrong hands. At some of the locations, I did not have network administrator privileges, limiting my options in regards to adding exceptions to the firewall rules. If I had to access the hosts for some reason, it was not a feasible solution to physically travel to the location each time. In my case, the «phone home» SSH functionality came to use when I had a set of Raspberry Pi's deployed at different physical locations in order to perform some statistical data collection.
Tired of having do manually configure this for each new location you «deploy» your Linux host? This guide will show you how you can configure a Raspberry Pi to «phone home» using a reverse remote SSH-tunnel.
Ever had the need of being able to connect to a Linux host at a remote location that have a dynamically configured IP-address or is located behind a NAT? You would normally have been required to provide some additional configuration in order to communicate with it.