Configuring Debian 8.6

From rdkwiki
Jump to: navigation, search


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
add: net mask x.x.x.x --> for example
add: gateway x.x.x.x --> for example
add: network x.x.x.x --> for example
add: dns-domain --> domain-name
add: dns-nameservers --> 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