Skip to content

Instantly share code, notes, and snippets.

@dvgamerr
Last active June 9, 2017 04:09
Show Gist options
  • Save dvgamerr/5d6d7e93783dd4285c6e5b83ad874e4e to your computer and use it in GitHub Desktop.
Save dvgamerr/5d6d7e93783dd4285c6e5b83ad874e4e to your computer and use it in GitHub Desktop.
linux-command

Setup networking

vi /etc/network/interfaces
auto ens160
iface ens160 inet static
address 192.168.0.22
gateway 192.168.0.2
netmask 255.255.255.0
dns-nameservers 192.168.0.2 8.8.8.8
/etc/init.d/networking restart

How to Disable Password Authentication for SSH

vi /etc/ssh/sshd_config
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
/etc/init.d/sshd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment