From the research by Google, I found there are two websites providing free service to remote access your Pi from anywhere through Internet.
1. Weaved, Inc.
Weaved provides your Raspberry any TCP based service you want to make available remotely – securely and without port forwarding!• SSH on port 22• Web (http) on port 80• WebIOPI on port 8000 (Raspberry Pi only)• VNC on port 5901• Custom TCP service on any port you likeMultiple services can be installed on same box, also there is free iOS app which can set up your Pi to send you push notifications.
The homepage says it adds the power of remote connections & mobile to your Raspberry Pi in as little as 15 minutes.
1.1 Manually Installation Procedure
pi@raspberrypi ~ $ wget https://github.com/weaved/installer/raw/master/binaries/weaved-nixinstaller_1.2.13.bin
--2015-10-06 12:45:16-- https://github.com/weaved/installer/raw/master/binaries/weaved-nixinstaller_1.2.13.bin Resolving github.com (github.com)... 192.30.252.129 Connecting to github.com (github.com)|192.30.252.129|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://raw.githubusercontent.com/weaved/installer/master/binaries/weaved-nixinstaller_1.2.13.bin [following] --2015-10-06 12:45:19-- https://raw.githubusercontent.com/weaved/installer/master/binaries/weaved-nixinstaller_1.2.13.bin Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.76.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.76.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 303036 (296K) [application/octet-stream] Saving to: `weaved-nixinstaller_1.2.13.bin' 100%[=============================>] 303,036 665K/s in 0.4s 2015-10-06 12:45:23 (665 KB/s) - `weaved-nixinstaller_1.2.13.bin' saved [303036/303036] pi@raspberrypi ~ $ chmod +x weaved-nixinstaller_1.2.13.bin pi@raspberrypi ~ $ ./weaved-nixinstaller_1.2.13.bin Extracting Weaved Software into /home/pi Finished extracting You are running installer script Version: v1.2.13 Last modified on February 26, 2015, by Mike Young. Now launching the Weaved connectd daemon installer... . We have detected an arm7l processor. Is this a Raspberry Pi 2? [y/n] y Detected platform type: pi Using /var/log/syslog for your log file Checking for compatibility with Weaved's network... Checking if DNS works ... .[OK] Checking TCP connectivity to weaved.com...<oip=192.168.2.250> [OK] Send to 174.36.235.146:5960 [] [mip=216.165.201.211] [oport=59612 mport=59612] [no remap] [preserve port] [OK] Congratulations! Your network is compatible with Weaved services. *********** Protocol Selection Menu *********** * * * 1) SSH on default port 22 * * 2) Web (HTTP) on default port 80 * * 3) WebIOPi on default port 8000 * * 4) VNC on default port 5901 * * 5) Custom (TCP) * * * *********************************************** Please select from the above options (1-5): 1 You have selected: 1. The default port for SSH is 22. Would you like to continue with the default port assignment? [y/n] y We will install Weaved services for the following: Protocol: ssh Port #: 22 Service name: Weavedssh22 Please enter your Weaved Username (email address): [email protected] Now, please enter your password: Copied notify.sh to /usr/bin Copied notify_Weavedssh22.sh to /usr/bin Copied weavedConnectd to /usr/bin startweaved.sh copied to /usr/bin no crontab for root no crontab for root Your device UID has been successfully provisioned as: 80:00:00:05:46:00:52:0F. Pre-registration of UID: 80:00:00:05:46:00:52:0F successful. We will now register your device with the Weaved backend services. Please provide an alias for your device: jrasp Your device will be called jrasp. Registering Weaved services for Weavedssh22 ................ Starting Weavedssh22... WeavedConnectd built Feb 26 2015 at 10:53:39 Now Starting Up Version 2.11 - (c)2015 Weaved, Inc. All Rights Reserved Built with UPNP NATPMP ALIGN BCASTER MALLOC_POOL LINUX RESOLVE BIGBUF pool=262144 Weaved Development Kit Version based on Rasberry Pi Version config file /etc/weaved/services/Weavedssh22.conf Starting up as daemon PID file specifed as /var/run/Weavedssh22.pid setting web config port to dest_server_port 80 ************************************************************************** CONGRATULATIONS! You are now registered with Weaved. Your registration information is as follows: Device alias: jrasp Device UID: 80:00:00:05:46:00:52:0F Device secret: The alias, Device UID and Device secret are kept in the License File: /etc/weaved/services/Weavedssh22.conf If you delete this License File, you will have to re-run the installer. ************************************************************************** Starting and stopping your service can be done by typing: "sudo /usr/bin/Weavedssh22.sh start|stop|restart" pi@raspberrypi ~ $ |
By click your device name, Weaved website will give you a new host name and ports for you to do remote connection from anywhere on Internet.
1.2 use apt-get to do auto installation
sudo apt-get update
sudo apt-get install weavedconnectd sudo weavedinstaller . //after entered required information, it will list all registed services // You will be prompted a menu to choose what you intend to do ========================================================= Protocol Port Service Weaved Name ========================================================= TCP 3389 xrdp xrdp-pi SSH 22 sshd jrasp-ssh ********************** Main Menu ************************ * * * 1) Attach/reinstall Weaved to a Service * * 2) Remove Weaved attachment from a Service * * 3) Exit * * * ********************************************************* Please select from the above options (1-3): |
2. Dataplicity
If your Raspberry Pi is connected to the internet, you can access it via Dataplicity from anywhere through Internet. You can even connect to devices behind firewalls without needing complex network configurations. Dataplicity connects using client-initiated HTTPS, so it's safe, encrypted and you don't need to make specific firewall exceptions. Dataplicity's homepage says only 60 seconds you can have your Pi to be ready for controlling from anywhere. Of course, it will take longer than 60 seconds but you will not wait more than 5 minutes. Here are all outputs with my test:
login as: pi
[email protected]'s password: Linux raspberrypi 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7 l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Oct 10 10:18:58 2015 from 192.168.2.120 pi@raspberrypi ~ $ curl -s https://dataplicity.com/1c7196e9.sh | sudo sh Welcome to the Dataplicity Shell Quick Install This may take up to 15 minutes on some systems, but often < 30 seconds [step 1 of 5] updating system... Selecting previously unselected package python-medusa. (Reading database ... 77461 files and directories currently installed.) Unpacking python-medusa (from .../python-medusa_1%3a0.5.4-7_all.deb) ... Selecting previously unselected package python-pkg-resources. Unpacking python-pkg-resources (from .../python-pkg-resources_0.6.24-1_all.deb) ... Selecting previously unselected package python-meld3. Unpacking python-meld3 (from .../python-meld3_0.6.5-3.1_armhf.deb) ... Selecting previously unselected package supervisor. Unpacking supervisor (from .../supervisor_3.0a8-1.1+deb7u1_all.deb) ... Setting up python-medusa (1:0.5.4-7) ... Setting up python-pkg-resources (0.6.24-1) ... Setting up python-meld3 (0.6.5-3.1) ... Setting up supervisor (3.0a8-1.1+deb7u1) ... Starting supervisor: supervisord. Processing triggers for python-support ... Selecting previously unselected package libossp-uuid16. (Reading database ... 77687 files and directories currently installed.) Unpacking libossp-uuid16 (from .../libossp-uuid16_1.6.2-1.3_armhf.deb) ... Selecting previously unselected package uuid. Unpacking uuid (from .../uuid_1.6.2-1.3_armhf.deb) ... Processing triggers for man-db ... Setting up libossp-uuid16 (1.6.2-1.3) ... Setting up uuid (1.6.2-1.3) ... Preconfiguring packages ... (Reading database ... 77701 files and directories currently installed.) Preparing to replace libssl1.0.0:armhf 1.0.1e-2+rvt+deb7u14 (using .../libssl1.0 .0_1.0.1e-2+rvt+deb7u17_armhf.deb) ... Unpacking replacement libssl1.0.0:armhf ... Preparing to replace libexpat1:armhf 2.1.0-1+deb7u1 (using .../libexpat1_2.1.0-1 +deb7u2_armhf.deb) ... Unpacking replacement libexpat1:armhf ... Selecting previously unselected package libexpat1-dev. Unpacking libexpat1-dev (from .../libexpat1-dev_2.1.0-1+deb7u2_armhf.deb) ... Selecting previously unselected package libssl-dev. Unpacking libssl-dev (from .../libssl-dev_1.0.1e-2+rvt+deb7u17_armhf.deb) ... Selecting previously unselected package libssl-doc. Unpacking libssl-doc (from .../libssl-doc_1.0.1e-2+rvt+deb7u17_all.deb) ... Selecting previously unselected package python2.7-dev. Unpacking python2.7-dev (from .../python2.7-dev_2.7.3-6+deb7u2_armhf.deb) ... Selecting previously unselected package python-dev. Unpacking python-dev (from .../python-dev_2.7.3-4+deb7u1_all.deb) ... Processing triggers for man-db ... Setting up libssl1.0.0:armhf (1.0.1e-2+rvt+deb7u17) ... Setting up libexpat1:armhf (2.1.0-1+deb7u2) ... Setting up libexpat1-dev (2.1.0-1+deb7u2) ... Setting up libssl-dev (1.0.1e-2+rvt+deb7u17) ... Setting up libssl-doc (1.0.1e-2+rvt+deb7u17) ... Setting up python2.7-dev (2.7.3-6+deb7u2) ... Setting up python-dev (2.7.3-4+deb7u1) ... [step 2 of 5] installing Dataplicity Core... id: dataplicity: No such user /tmp/tmpYpFshT/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriatly and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. /tmp/tmpYpFshT/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriatly and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: python-psutil 0 upgraded, 1 newly installed, 0 to remove and 93 not upgraded. Need to get 54.4 kB of archives. After this operation, 264 kB of additional disk space will be used. Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-psutil armhf 0.5.1-1 [54.4 kB] Fetched 54.4 kB in 10s (5,203 B/s) Selecting previously unselected package python-psutil. (Reading database ... 79253 files and directories currently installed.) Unpacking python-psutil (from .../python-psutil_0.5.1-1_armhf.deb) ... Setting up python-psutil (0.5.1-1) ... Processing triggers for python-support ... [step 3 of 5] installing Dataplicity... [step 4 of 5] registering device 'raspberrypi'... [step 5 of 5] starting service... Dataplicity Shell is now installed! Your device will be online in a few seconds Visit https://dataplicity.com/devices/ to manage your device pi@raspberrypi ~ $ Restarting supervisor: supervisord. |
After installed the Dataplicity package, you can log in to Dataplicity, select the device you want and access your remote shell. It's that simple!
Your devices page at Dataplicity Site before installed package |
Your Raspberry device shows in the Your devices page |