Limit ssh access by IP address

nano /etc/hosts.allow
sshd : localhost : allow
sshd : 192.168.0. : allow
sshd : 99.151.250.7 : allow
sshd : mydomain.net : allow
sshd : ALL : deny

 

Enable SSH root login (Ubuntu)
nano /etc/ssh/sshd_config

Change line:
FROM:
PermitRootLogin prohibit-password
TO:
PermitRootLogin yes
sudo systemctl restart sshd

 

Restrict SSH to one interface
nano /etc/ssh/sshd_config

Change line:
#ListenAddress 0.0.0.0
TO:
ListenAddress 111.222.111.222

 

Configure network (Ubuntu)


nano /etc/network/interfaces

Change line to:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

address 10.0.0.41
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.1
dns-nameservers 10.0.0.1 8.8.8.8
dns-domain reneventura.com
dns-search reneventura.com

 

Restart network adapter


ifdown eth0; ifup eth0

 

Change Hostname


nano /etc/hostname