Here we have one lovely little trick with this RPI3B+ is that we do have the option to use Android devices with SSH aplications. 2 main applications are
These are shown below in the top right of the image. You can download these via the PLAY store in the usual way.
First of all we shall set up RaspController
Open the RaspController app by clicking on the icon. Currently looks like the Blue icon in the top right of the bove image. You will be greeted by the following screen but without any devices in the list.
Now click the + button in the bottom right corner. You should now have the following screen but without details filled in.
Enter the Device Name – This is what it will be called on your Android device, like a file name.
Enter the Host IP Address – This is the IP of the Raspberry Pi on your network
Port / SSH: This should be set to 22, if not set it to 22.
Timeout – This is how long it will keep looking for your Raspberry PI, in seconds, before it gives you an error message. Set this to 10
Username – This is the Username of the Raspberry Pi. the default is pi but yours maybe different. The main point to know is these are the logon credentials on the Raspberry Pi.
Authentication – Set to Password. If you are an advanced user then you may have RSA keys assigned but we will use Password
Password – This is your Raspberry Pi password for the user entered above. Default is raspberry but you should change this. Again the important thing to note is this is the Logon credentials on the Raspberry Pi.
Now tap the Connection Test button.
You should receive a Connected Notification.
If there is a problem then you will get a message stating Connection error:timeout:socket is not established.
Now Click Save. this is the icon with a floppy disk symbol in the bottom right corner.
You will now be taken back to the Device list page.
Click on your device and it will connect and display the following page showing a multitude of options and helpfull diagrams.
From here you can access most of the controls on your device without requiring code. When you do want to use code and programmaticaly use your SSH connection, Then you can click on Shell SSH.
You may prefer to have only an SSH command or connection App that has the ability to attach Plugins, and that is why I also say you can connect via the JuiceSSH app in Android
To Connect Via JuiceSSH
Start tha app by tapping on its Lemon Icon. You should then be greeted by a screen like below. your Freequently used area will be blank on first use.
The first button at the top of the list is called Connections. Tap it once and it will bring you to the Connections Tab, as below.
Push the Yellow + button in the bottom right corner to show the following screen.
Enter the Nickname – This is the name you want to call the device on the Android device only.
Type – Leave as SSH
Address – This is the IP address of the Raspberry Pi on the local network.
Identity – Select New ( This is the connection Details)
This then opens the following screen
Set the Nickname to Whatever you want but I always state Connection as you can reuse these onto another Connection.
Set the Username to the Raspberry Pi Username ( default is pi) This is the Raspberry Pi credentials.
Set the password to that users password (default is raspberry) This is the Raspberry Pi credentials.
Then press the Tick in the top right corner.
You will now be returned to the New Connection Screen and the Identity will now be set to the nickname that you entered in the last screen.
Advanced settings affords more connectivity options but for now check that the
Port is set to 22
Connect Via and Run Snippet options are showing Optional
Backspace is set to Default(sends DEL)
Now click the tick in the top left corner.
I have had 2 different behaviours from this app after clicking the tick depending whether I used an android phone or tablet. It will either take you back to the connections tab or where you tap on your device name, which is the normal process once you open the app and logon to the Raspberry Pi, or it will try to connect automatically.
Either way you should see the connection screen as below, promptly followed by a Shell script prompt ( Think old DOS command line) at the top left corner.
You should now be able to code your raspberry Pi using SSH.
When we use an Android application in these tutorials, we will use the RaspConnect app but it is usefull to know that there is an alternative that is freely available and allows you to expand when your skills do.