mirror of
https://github.com/elasticdog/packer-arch.git
synced 2026-08-04 08:43:04 +00:00
Change name of SSH setup script to reflect actions Remove unnecessary SSH key setup in pre-install environment
11 lines
455 B
Bash
11 lines
455 B
Bash
#!/usr/bin/env bash
|
|
|
|
PASSWORD=$(/usr/bin/openssl passwd -crypt 'vagrant')
|
|
|
|
echo "==> Enabling SSH"
|
|
# Vagrant-specific configuration
|
|
/usr/bin/useradd --password ${PASSWORD} --comment 'Vagrant User' --create-home --gid users vagrant
|
|
echo 'Defaults env_keep += "SSH_AUTH_SOCK"' > /etc/sudoers.d/10_vagrant
|
|
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/10_vagrant
|
|
/usr/bin/chmod 0440 /etc/sudoers.d/10_vagrant
|
|
/usr/bin/systemctl start sshd.service
|