Difference between revisions of "Configuring Debian 8.6"
From rdkwiki
(Created page with "== 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...") |
m |
||
(5 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
== Setting a hostname and configure the network interface == | == 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) | 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: '''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: '''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: '''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-domain testexample.com''' --> domain-name | ||
add: '''dns-nameservers 192.168.1.200''' --> dns-server to use | add: '''dns-nameservers 192.168.1.200''' --> dns-server to use | ||
− | |||
* '''systemctl restart networking''' --> restart the network with the new configuration | * '''systemctl restart networking''' --> restart the network with the new configuration | ||
* '''hostnamectl set-hostname <hostname>''' --> set hostname, make sure it's a FDQN | * '''hostnamectl set-hostname <hostname>''' --> set hostname, make sure it's a FDQN | ||
Line 27: | Line 27: | ||
== Update the system with latest security and software patches == | == 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 == | == Securing SSH access == | ||
You can find this here: [[SSH key-based authentication]] | You can find this here: [[SSH key-based authentication]] |
Latest revision as of 20:38, 2 November 2016
Contents
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