Configuring Debian 8.6

From rdkwiki
Revision as of 20:38, 2 November 2016 by Rob (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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: network x.x.x.x --> for example 192.168.1.0
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

installing the ssh-server

  • apt-get install ssh --> install the ssh-server + client-tools
  • systemctl start ssh --> start the ssh-server
  • systemctl enable ssh --> enable the ssh-server at boot

Securing SSH access

You can find this here: SSH key-based authentication