Skip to content

Instantly share code, notes, and snippets.

@sanrandry
Last active August 2, 2020 16:55
Show Gist options
  • Save sanrandry/d05db8c5dd4f185a35182cccafded15b to your computer and use it in GitHub Desktop.
Save sanrandry/d05db8c5dd4f185a35182cccafded15b to your computer and use it in GitHub Desktop.
ubuntu server configuration

ubuntu server configuration

ip address configuration with netplan: https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/netplan-how-to-configure-static-ip-address-in-ubuntu-18-04-using-netplan.html

install ssh

sudo apt-get install ssh

create a new user

sudo adduser <the_user_name>

add the user to the sudo group

sudo usermod -aG sudo <the_user_name>

disallow remote ssh access to root

sudo vim /etc/ssh/sshd_config

and edit the line

PermitRootLogin yes

to

PermitRootLogin no

N.B: if don't find it, never mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment