Armbian OS/Ubuntu – Remote Management/Access

What is remote management?

Basically its any form of remotely accessing your server to control it, without actually accessing it locally with a keyboard+mouse and monitor attached. So this could be accessing it from your phone, tablet or another computer. Whilst there are many options available out there, Im going to cover off 3 options. Ill be working with an Ubuntu variant of Armbian, though slight changes may be required to setup these on Debian variants.

What are the options?
  • SSH – Basically a secure command line. Great for anyone happy to work purely at command line.
  • RDP – Microsoft Remote Desktop. Gives you a good quality remote connection to the GUI, as if you were sat at the machine, though expect a little mouse/keyboard lag.
  • Webmin – A near enough full management of your box through a web interface, (installing/uninstalling packages, terminal access, stats etc).

As a side note, Id suggest NOT posting any of these externally accessible on the internet unless you know what you are doing and have a good quality firewall/security setup, otherwise, your box will get attacked and possibly hacked.

Using SSH

SSH or Secure Socket Shell, is a protocol which allows you to connect securely to a remote computer a text-based interface.

When SSH is connected you will get a terminal window and you will be able to control the server by typing commands within the client on your local computer.

Installing SSH Server on your Ubuntu/Armbian OS

Locally on your Ubuntu/Armbian system, open a terminal window and enter the following commands:

sudo apt-get install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
sudo ufw allow ssh
sudo ufw enable

These commands will install OpenSSH server, set it to automatically start each time the computer starts up and also allow it through the firewall so it can be remotely accessed.

Installing an SSH client on a Ubuntu/Armbian OS

Locally on your Ubuntu/Armbian system, open a terminal window and enter the following commands:

sudo apt-get install openssh-client

You can now use type

ssh your_username@host_ip_address

so if your user account is called MYACCOUNT and your Ubuntu/Armbian system is on IP address 192.168.1.10, you would use

ssh MYACCOUNT@192.168.1.10

The first time you connect, you will be prompted to accept the security certificate and then presented with a standard linux terminal window command line.

Installing an SSH client on Windows

To use SSH on Windows computers, Id suggest using Putty https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Its as simple as download and install Putty. When you open Putty the default options are set to SSH, so all you need to do is type in your IP address and hit connect. You will be asked 1st time to accept the secure certificate and once you do, presented with a standard linux terminal window command line.

Using RDP

RDP or Remote Desktop Protocol, is a protocol which allows you to connect securely to a remote computer via a graphical user interface, as if you were sat at the computer with a mouse+keyboard attached. Other than a little bit of lag, you wont notice much difference than being directly at the computer, however this doesnt make it great for watching videos/playing games, but does make it ideal for management/general use.

Installing RDP on Armbian

If you are using Armbian, the simplest way to install RDP is to use the Armbian Config utility, as everything is setup for you automatically. To follow this procedure, look at this video from the 3 minute mark. https://www.youtube.com/watch?time_continue=184&v=jhd2LlfaZtA

Installing RDP Manually

As the instructions have varied/changed over time, the best link to follow for the current instructions is here https://help.ubuntu.com/community/xrdp

Connecting from a Windows computer to your linux machine

When logged into your windows desktop, click the start button and type Remote Desktop (or hunt the applications for Remote Desktop). When you start the application, you will need to enter either the name or IP address of the computer you want to connect to and then click the connect button. 

The first time you connect you will be asked to accept the security certificate and once you accept, you will be presented with a login prompt for your Ubuntu/Debian/Armbian server. To follow this procedure, look at this video from the 3 minute mark. https://www.youtube.com/watch?time_continue=204&v=jhd2LlfaZtA

Using Webmin

Webmin, is a near full administrative suite provided through a secure web page. Through WebMin, you can run a terminal, diagnose your system performance, read logs, edit files, manage settings, disks, network, files/folder, many services such as Samba, SSH, setup email alerts, backup your folders, update your firmware/software, install new software etc. Its a quite comprehensive list of things you can do/manage and Im barely scratching the surface, though its ideal for people who want to install a headless (command line only) system, yet have quite easy control, beyond typing commands at an SSH shell. Full details are available here http://www.webmin.com/

Installing Webmin

For this you will need a Terminal window, either locally at the computer or via SSH, as shown toward the top of this article. You will need to log in as the root account to ensure the installation can pass all the commands it requires.

Once at a terminal window, you will need to type the following:

nano /etc/apt/sources.list

With nano open, move to the bottom of the file and enter the following on an empty line, then use Ctrl+x to save (press y to save when prompted) and then exit out the file.

deb https://download.webmin.com/download/repository sarge contrib

Once you are back at the terminal window, type out the following commands one by one.

cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
apt-get install apt-transport-https
apt-get update
apt-get install webmin

At this point, Webmin is installed and you can connect to perform initial configuration, by going to https://yourservername:10000 in any web browser. You do need to log in as root or an account that has permissions to sudo commands. For more documentation/instructions, you can look towards the Webmin site http://www.webmin.com/

However, what you will notice is that you receive a security certificate warning. So if you wish to either create your own self-signed certificate or a real SSL certificate, you will need to install OpenSSL with the below instructions.

Installing OpenSSL

Back at a Terminal window, either locally at the computer or via SSH, enter the following commands:

cd /tmp
wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz
tar xvf openssl-1.1.1c.tar.gz
cd openssl-1.1.1c
sudo ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'

The next 2 commands will take some time to complete, anywhere between 15 to 30 minutes, so be prepared to go and do some other things while these complete.

sudo make
sudo make install

Once those have completed, now we need to edit the manpath (manual path) file, to ensure the system looks in the correct area for SSL related certificates and generation of certificates.

sudo nano /etc/manpath.config

Enter the following line in the file, then exit with saving by Ctrl+X.

MANPATH_MAP /usr/local/ssl/bin /usr/local/ssl/man

Finally we need to tell the system to update its self.

sudo mandb

Once this is completed, you can now sign into https://yourservername:10000 though you will still initially get a certificate warning, however, if you go to the Webmin menu > Webmin configuration and SSL Encryption, you will now have the options to create a Self Signed certificate which you can import into your computers later to negate the certificate warning message, or the options to generate a certificate signing request to use with a 3rd party certificate authority such as Godaddy or Lets Encrypt.

If you do generate a Self Signed certificate, you can export it on the Current Certificate menu, and I would suggest using PKCS12 format for importing into a Windows computers certificate store.

Armbian Tech Guides

Read Previous

Armbian OS – Backing up eMMC/NAND (Via CLI)

Read Next

Windows on ARM – The future?

avatar
500
error: Content is protected !!