Sha256: 7a111242595ce55ad5b4a7a9e7f0733aae6fddd4accb5482c53d2b60ee32c1d3

Contents?: true

Size: 558 Bytes

Versions: 792

Compression:

Stored size: 558 Bytes

Contents

#!/bin/bash --login
source /etc/profile.d/globals.sh

for user in pwnadmin admin; do
  if [[ ! -d "/home/${user}/.ssh" ]]; then
    sudo mkdir -p /home/$user/.ssh
    sudo chmod 0700 /home/$user/.ssh
    sudo touch /home/$user/.ssh/authorized_keys
    sudo chmod 0600 /home/$user/.ssh/authorized_keys
    sudo chown -R $user:$user /home/$user/.ssh
  fi

  $screen_cmd "wget --no-check-certificate https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub -O ->> /home/${user}/.ssh/authorized_keys ${assess_update_errors}"
  grok_error
done

Version data entries

792 entries across 792 versions & 1 rubygems

Version Path
pwn-0.5.214 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.213 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.212 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.211 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.210 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.209 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.207 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.206 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.205 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.204 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.203 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.202 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.201 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.200 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.199 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.198 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.197 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.196 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.195 packer/provisioners/install_vagrant_ssh_key.sh
pwn-0.5.194 packer/provisioners/install_vagrant_ssh_key.sh