Generate an SSH Key
You probably already have a public and private key. Check and make sure.
ls -a ~/.ssh | grep id
=> id_rsa
=> id_rsa.pub
If you don't see these keys listed, generate them.
ssh-keygen -t rsa -C "your@email.com"
Bash Detour
The next slide will make use of $EDITOR
. It is a sort of "global" bash variable you can set to your favorite editor. Programs like Git make use of it when told to do so.
In .bash_profile
export EDITOR="subl -w"
Restart terminal
# Quick access to Bash Profile
alias bp="$EDITOR ~/.bash_profile"
# Quick access to homestead directory from terminal
alias homestead="cd /path/to/your/homestead/repo"
# Quick access to hosts file from terminal
alias hosts="$EDITOR /private/etc/hosts"
# Quick access to VM
alias vm="ssh vagrant@127.0.0.1 -p 2222"
Adding a Site
- Clone my vagrant-test repo
git@github.com:surprisehighway/vagrant-test.git
- Edit Homestead.yaml
- Edit hosts file
vagrant provision
- Hit the URL on port 8000 in your browser.