ansible-php-workstation

Configure remote SSH on the target computer (to provision packages via SSH)

  1. Install the SSH daemon
$> sudo apt install openssh-server
$> sudo systemctl enable ssh
$> sudo systemctl start ssh
  1. Create a sysadmin account and set a complex password (You’ll only need it now to configure sudo/SSH - no need to remember it)
$> sudo useradd -m -g sudo edw-sysadmin
$> sudo passwd edw-sysadmin
  1. Configure sudo group without password in /etc/sudoers
$> sudo su edw-sysadmin
# Here you will enter password
$> echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee "/etc/sudoers.d/dont-prompt-$USER-for-sudo-password"
  1. Configure SSH access from your computer to target computer for sysadmin account
$> ssh-copy-id -i ~/.ssh/id_ed25519.pub edw-sysadmin@192.168.56.3

Back