ADVANCED RASPBERRY PI OPTIONS


Gordon Gibby KX4Z

October 24 2016



Gaining Remote Command Line Access

Gaining command line access to your raspberry pi from another computer: can be done with either telnet (insecure) or ssh (encrypted). This is, however, provided that your raspberry is on a network (which can be wired or wireless, and that you have another computer on the same network (if a private one) which can access it). A background process (“daemon”) runs on the raspberry and you use the corresponding client program to access your raspberry. In order to do this you need to know the IP number of your Raspberry. This can be found by running the ifconfig command on the Raspberry, and looking to see your IP number in the resulting output .


You can enanble telnet on an windows10 machine by accessing the settings and searching for the ability to turn on/off windows features.


TCP/IP computers not only have an IP number (e.g., 192.168.1.1) but to separate out the streams of digital communication that need to go to various different programs, they have 64,000 “ports”. Some services, such as telnet, have commonly-used and assigned port number. Telnet normally uses port 23, however linbpq offers a telnet like command line access, which runs on port 8010. (linbpq also offers a http:// access which runs on port 8080). A nice list of known ports can be found at: http://packetlife.net/media/library/23/common_ports.pdf



Use the following information to install the telnet server (“daemon”) application on your Raspberry pi: http://www.ronnutter.com/raspberry-pi-enabling-telnet/

You might have to also enable a telnet client on your raspberry, in order to access your running linbpq, if you want to access it that way. Once installed, the command to opent your own linbpq via telnet is telnet 127.0.0.1 8010 (note the space). By contrast, in a web browser you use a colon: so to access your linbpq that way, you type http://127.0.0.1:8080 in the URL line.


To access SSH use PuTTY which can be downloaded for several platforms. Here is a Windows download: http://www.putty.org/



There is a host of useful information about Raspberry's, commands, linux, etc that can be accessed here: https://www.raspberrypi.org/documentation/



FULL GRAPHICAL ACCESS

You can actually gain full graphical user interface access rather easily to your Raspberry, from a separate computer, so that you don't even need a monitor, keyboard or mouse at all on your Raspberry. You use a VNC server on your Raspberry and a VNC client on another computer, such as a laptop running Windows. The instructions for how to do this are here: https://www.raspberrypi.org/documentation/remote-access/vnc/ And the application for the client computer can be found here: https://www.realvnc.com/download/viewer/ This is really a nice feature, espeically if you don't want to have to have a separate monitor for every computer you run around your house!

Note: my most recent Raspian's have had a OPTION in the setup sequence to enable VNC....I haven't tried this but it might well be all you need on the Raspberry Pi!




ROUTER

Since your Raspberry is a full linux computer, you can easily make it be a WIFI router, providing dhcp, DNS and other services. People used to make i386 computers running linux perform as fine 10 Mbit ethernet routers, so this is not a problem for the much faster processor on your Raspberry Pi. For more information: http://jacobsalmela.com/raspberry-pi-and-routing-turning-a-pi-into-a-router/


BETTER BROWSER

I can't get dialog boxes and other features I need, to work on the installed browser. So I installed the Google Chromium browser using the instructions below. Currently, you may be able to get it much more easily with the command:


 sudo apt-get install chromium-browser



Otherwise, here is the long way:

wget http://ports.ubuntu.com/pool/universe/c/chromium-browser/chromium-browser-l10n_48.0.2564.82-0ubuntu0.15.04.1.1193_all.deb

wget http://ports.ubuntu.com/pool/universe/c/chromium-browser/chromium-browser_48.0.2564.82-0ubuntu0.15.04.1.1193_armhf.deb



wget http://ports.ubuntu.com/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_48.0.2564.82-0ubuntu0.15.04.1.1193_armhf.deb

sudo dpkg -i chromium-codecs-ffmpeg-extra_48.0.2564.82-0ubuntu0.15.04.1.1193_armhf.deb

sudo dpkg -i chromium-browser-l10n_48.0.2564.82-0ubuntu0.15.04.1.1193_all.deb chromium-browser_48.0.2564.82-0ubuntu0.15.04.1.1193_armhf.deb




Gaining Access to a Raspberry on a Private Net Inside a Router


Most people today don't have fixed, “static” ip numbers; their coax- or dsl- modem does network address translation and “creates” a 196.168.1.X private (unroutable) network for their local home computers. Usually there is a DHCP server running on the router and it provides on request, a private IP number for each TCP/IP device in the home.


This is a problem if you wish to reach their Raspberry for management/maintenance. Not only could the ip number change, but it doesn't have a domain name, either.


There are organizations who have solutions for this problem, one of which is no-ip.com Their solution is well explained on their web site, and gives you up to three free dynamic IP dns names, as long as you “confirm” them every 30 days. For a fee, they will enhance your access so you don't need to keep confirming them. Basically you:



  1. Find the IP address assigned to the raspberry on the private net

  2. Find the IP address their router has obtained from the Internet Service Provider (ISP)

  3. If possible, install a small program provided by no-ip.com on a Windows or other machine (not the raspberry unfortunately) that is always on, inside their net. This program keeps no-ip.com up-to-date and what IP number has been assigned to their router.

  4. Alternatively, they can directly talk to some models of router.

  5. Then set the router to allow ddns or port-forwarding, so that requests to certain ports (I recommend SSH, and possibly VNC if you have to have graphical access....remember this is opening up ports that could be used to hijack your raspberry) are automatically forwarded to the Raspberry. This will be slightly different on each router but many will have that feature.

  6. Then you can use either their router IP, of the “free DNS name” (might take a day to register) to access the SSH server on the Raspberry with PuTTY in SSH mode.







3