Let's setup an environment for this course. It will be an entirely command-line environment.
First, download a CentOS Minimal ISO and install VirtualBox. CentOS is a stable server distribution, often used in production servers.
Create a new VM with Red Hat-type guest (CentOS is essentially community Red Hat), and configure it as shown below. Particularly, create a hard disk, and connect the ISO as a Live DVD. The network should be configured as a bridged adapter, as shown, to enable Internet access while avoiding NAT issues. You may want to configure an additional host-only network adapter in order to support internal host-to-guest connections.
Now boot the Live DVD, configure network, enable Network Time in Date & Time settings, and set root and user passwords (for user, make it an administrator).
Now, reboot, and login as non-root user. id command shows that the user test is in wheel group, which means that it can run administrative commands using sudo. ip addr shows the assigned IP addresses.
Note that bridged networks have their own IP stack, and connections from host to guest will utilize the available switch hardware. Therefore, make sure that your home Wi-Fi router does not enable AP isolation!
Install SSH and SFTP clients, preferably multi-tabbed like Xshell and Xftp, and generate a private key.
Afterwards, export it to the server:
Configure the SSH client to use the key pair to login, and check that you can login without password. Use the IP from the ip addr output above. It is best to use the link-local IPv6 address with the %XX suffix shown in ipconfig output in Windows for the relevant network adapter (e.g., Local Area Connection, or VirtualBox Host-Only Network). For instance, I use fe80::a00:27ff:fe35:f4ff%11. This address won't change when moving networks, although you may need to update the suffix. Note that SCE's Wi-Fi does not route IPv6 — you may want to rely on an additional host-only network adapter for that.
Once you are sure that you can login without a password, upgrade the system, install basic tools, and disable passwords entirely:
sudo yum -y upgradesudo yum -y update @base
Uncomment %wheel line with NOPASSWD in /etc/sudoers:
sudo nano /etc/sudoers
Login again and ensure that sudo does not ask for password!
Disable passwords in SSH:
sudo nano /etc/ssh/sshd_config
Change/add the following settings:
PasswordAuthentication noAllowUsers test <-- your username hereGSSAPIAuthentication no