Superseded by https://github.com/thunderrabbit/new-DH-user-account
The following has been superseded by https://github.com/thunderrabbit/new-DH-user-account
From their panel -> Domains -> Manage Domains -> Add Hosting to a Domain / Sub-domain
fill in the blanks, including create a new user
Make sure the new user is a shell user at https://panel.dreamhost.com/index.cgi?tree=users.users
Create a new ssh key for the new site
ssh-keygen
Enter the domain as the key filename
Move the keypair to ~/.ssh
Append something like the following to ~/.ssh/config
:
Host example
HostName example.com
User example
scp the public key to the new machine:
scp ~/.ssh/example.pub example:
ssh into the new machine and move the key to ~/.ssh
mkdir ~/.ssh
chmod 700 ~/.ssh
Move the public key to ~/.ssh/authorized_keys
chmod 400 ~/.ssh/authorized_keys
Make ~/.bash_aliases
look like this:
alias ls='ls --color=auto'
alias gitd='git diff -b'
alias gitl='git log --oneline --graph --decorate --all'
alias gits='git status'
Append this to ~/.bash_profile`
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
EDITOR=/usr/bin/emacs
export EDITOR
Edit .gitignore
*~
.cache
logs/
.ssh/
.bash_history
example.com
Set up git:
git config --global core.excludesfile ~/.gitignore
git config --global user.name "Rob Nugen"
git config --global user.email rob@example.com
Save all the things:
cd ~
git init
git add .
git commit -m "First version of all the things"
Log out of the new machine
On local machine:
Add the IdentityFile to ~/.ssh/config
:
Host example
HostName example.com
User example
IdentityFile ~/.ssh/example.com
Now ssh into the site:
ssh example
Enter password for the ssh key and you should be in.