may's blog
May
| Title | May |
|---|---|
| Slug | may |
| User | martin |
| Id | 2 |
| Created | 1/17/26, 9:38 AM |
| Modified | 1/17/26, 9:38 AM |
Description
Related Posts
| Id | Title | Body | Slug | Published | Created | Modified | |
|---|---|---|---|---|---|---|---|
| 2 | Initial Server Setup on Cloud Services | When you installing linux server to you computer you will create new user trough instll wizard but most cloud (if not all) will create only root user which have all rights to everything on your server. <!--more--> So login to your server as root `ssh root@your_server_ip`. ## 1. Create new user First of all let's create new user. ```bash adduser emma ``` System will ask you for password and some other details (only password and password configrm are required). I recommend to use strong password (you can create yourself or use some of password generators). This user has no administrative privileges so add it to `sudoers` group which grat all admin privileges to your user ```bash usermod -aG sudo emma ``` ## 2. Firewall Ubuntu server using UFW firewall, it's installed from start but its disabled. So let's setup it. Some of applicaiton can register their profiles with firewall after installation. To show those you can tppe: ```bash ufw app list ``` You will see something like this ```bash #output Available applications: OpenSSH ``` Ok. Before activation firewall we need to make sure we dont lost access to server via SSH, so enable OpenSSH allication with firewall ```bash ufw allow OpenSSH ``` After this step we can enable UFW firewall by typing: ```bash ufw enable ``` Type `y` and press `Enter` to continue. To show enabled ports / application type following: ```bash ufw status ``` ```bash # output Status: active To Action From -- ------ ---- OpenSSH ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) ``` As you can see firewall allowing connection to OpenSSH on IPv4 and IPv6, by default all others connections are blocked. ## 3. Accessing server with regular user To connect type: ```bash ssh emma@your_server_ip ``` You are now logged in as regular user but if you remember we added user to sudoers group. So if you need access some privileged commands you add `sudo` before this command, System will ask you for your password. ``` bash sudo privileged_command ``` ## What next? So now you have good foundation fro your server and you can install more application on it if you need them. If they need public access (like web servers) don't forget to add them to firewall rules. ## At the end If you are using strong password with small/big letters, numbers and special characters you have solid protechtion but i sill recommend to use keys for authentication which ill show you in this blog post [Settig Up SSH Keys for Ubuntu](/posts/2020/07/settig-up-ssh-keys-for-ubuntu/). Stay safe. Bye. | Initial-server-setup-foc-clouds | 1 | 1/17/26, 2:35 PM | 1/17/26, 2:35 PM | View |
| 1 | Hello-world | This si first post on page. This page is made by hugo with Gitlab-CI, ill wrtie more about it in future posts. | hello-world | 1 | 1/17/26, 2:32 PM | 1/17/26, 2:33 PM | View |