To connect to the Database Server, we ssh tunnel through the Web Server to get around the firewall.
- Log into the Web Server as a super user
- Create user
- sudo adduser [new user]
- sudo usermod -aG sudo,ubuntu,web_editors [new user]
- Need to set up user directory
- cd to [new user] home directory
- mkdir .ssh
- touch .ssh/authorized_keys
- Add in private key
- vi .ssh/authorized_keys
- Should look like "ssh-rsa [lots of text]== [new user]"
- Set up Putty
- Host name [new user]@www.woccu.org:22
- Connection->SSH->Auth
- Allow Agent Forwarding
- Add Private Key
- Connections->SSH->Tunnels
- Source Port: 5432
- Destination: [AWS server]:5432
- Save and Open
- Set up Sql Manager
- Host: localhost:5432
- Username: [Postgres User]
- Password: [Postgres Pass]
- Database: woccu_dev
- Uncheck "Refresh objects"