Difference between revisions of "Configuring Debian 8.6"

From rdkwiki
Jump to: navigation, search
m
Line 26: Line 26:
  
 
== Update the system with latest security and software patches ==
 
== Update the system with latest security and software patches ==
You can secure your sites with certficates for free. I like Let's Encrypt. there's a wiki here: [[Linux installing updates]]
+
You can find how to update your system here: [[Linux installing updates]]
  
 
== Securing SSH access ==
 
== Securing SSH access ==
 
You can find this here: [[SSH key-based authentication]]
 
You can find this here: [[SSH key-based authentication]]

Revision as of 20:25, 2 November 2016

Intro

The steps below are after you have done the initial setup. Assuming you did a minimal installation, didn't create a user and didn't configure the network-interface and hostname during the setup-wizard.

Install sudo

  • apt install sudo --> install sudo application

Creating a user with admin-rights (sudo)

  • adduser <username> --> create a new user
  • passwd <username> --> set a password for the user
  • visudo --> to give the new user sudo-rights
 add <user> ALL=(ALL:ALL) ALL after root ALL=(ALL:ALL) ALL

Now you can log off and logon and continue as the new non-root user.

Setting a hostname and configure the network interface

  • nano /etc/network/interfaces --> configure network interface (make sure to set at least IP-address, gateway, DNS)
comment: # iface eth0 net dhcp --> disable dhcp for the interface (put the # in front)
add: address x.x.x.x --> for example 192.168.1.10
add: net mask x.x.x.x --> for example 255.255.255.0
add: gateway x.x.x.x --> for example 192.168.1.1
add: dns-domain testexample.com --> domain-name
add: dns-nameservers 192.168.1.200 --> dns-server to use
  • systemctl restart networking --> restart the network with the new configuration
  • hostnamectl set-hostname <hostname> --> set hostname, make sure it's a FDQN
  • hostnamectl status --> check the hostname configuration

Update the system with latest security and software patches

You can find how to update your system here: Linux installing updates

Securing SSH access

You can find this here: SSH key-based authentication