Install pure-ftpd
$ sudo apt install pure-ftpd
$ sudo systemctl start pure-ftpd
$ sudo systemctl enable pure-ftpd
Configure Firewall
$ sudo ufw allow ftp
Check the configuration
$ ftp 192.168.10.108
About Linux
$ sudo apt install pure-ftpd
$ sudo systemctl start pure-ftpd
$ sudo systemctl enable pure-ftpd
$ sudo ufw allow ftp
$ ftp 192.168.10.108
Install Apache2 web server.
$ sudo apt install apache2
$ sudo systemctl start apache2
$ sudo systemctl enable apache2
$ sudo ufw http
Visit
http://192.168.10.108
from a Web browser. The IP address should be modified to yours.
$ sudo a2enmod userdir
$ mkdir /home/user/public_html
$ chmod o+rw /home/user/public_html
First, you should allow a secret port number to access the server.
$ sudo ufw allow 80022
$ sudo ufw reload
$ sudo vi /etc/ssh/sshd_config
Edit the “Port” option to your allowed port number.
Port 80022
$ sudo systemctl restart sshd
Edit the configuration file on the local machine.
$ vi ~/.ssh/config
Host raspberrypi
HostName 192.168.10.108
IdentifyFiles ~/.ssh/id_rsa
User <<user-name>>
Port 80022
$ ssh raspberrypi
$ sudo ufw status numbered
$ sudo ufw delete <<Rule number for Port 22>>
You should enable firewall to block dangerous access from outside. To enable UFW,
$ sudo systemctl enable ufw
$ sudo ufw status numbered
$ ssh ufw allow ssh
$ sudo ufw enable
$ ssh keygen -t rsa -b 4096
$ ssh-copy-id -i ~/.ssh/id_rsa.pub user@192.168.10.108
$ ssh user@192.168.10.108 -i ~/.ssh/id_rsa
$ sudo vi /etc/ssh/sshd_config
Notice: The file to edit is sshd_config not ssh_config.
In the file, edit below option from yes to no.
PasswordAuthentication no
After edit the file, you must restart sshd.
$ sudo systemctl restart sshd
On windows client, install ssh-copy-id command first. By using chocolatey, type the command on PowerShell as Administrator.
> choco install ssh-copy-id
$ ssh ubuntu@<your ip address>
For example
$ ssh ubuntu@192.168.10.108
For security rename ubuntu user to another one.
$ sudo usermod -l user ubuntu
$ sudo usermod -d /home/user -m user
$ sudo groupmod -n user ubuntu
$ sudo exit
Insert the SD card to Raspberry Pi and turn on the switch.
After while, the installation will finish automatically.
Initial account of Ubuntu on Raspberry Pi is
For security issue, you should change the password as soon as possible.
$ sudo password <secret-password>
Update the system for security issue.
$ sudo apt update
$ sudo apt upgrade
In shortly.
$sudo apt update && sudo apt upgrade -y
Download the Imager from the raspberrypi.org site.
https://raspberrypi.org/software/
Install the Imager on Ubuntu.
$ sudo dpkg -i imager_amd64.deb
Insert a SD card to the PC and run the imager.
$ sudo rpi-imager
# Heading1
## Heading2
### Heading3
#### Heading4
##### Heading5
###### Heading6
line1␣␣
line2␣␣
Paragraph1
Paragraph2
---
* emphasis *
** strong **
1. list1
1. list2
1. list3
Any numbers are acceptable. If all the numbers are set to 1, then numbers are automatically order properly.
+ list1
+ list2
+ list3
␣␣␣␣This is a
␣␣␣␣Preformatted
␣␣␣␣Document.
> Quote
>> Sub Quote
> Quote
'printf("Hello\n");'