Working Notes: SYS265: Amazon EC2 Lab - eliminmax/cncs-journal GitHub Wiki

Amazon Web Services: EC2 Lab

NEW PAGES:

Making Linux Your Own: Change Account Username

Amazon EC2: Access Machines Remotely

Amazon EC2: Firewall Management

Amazon EC2: Get Default Windows Password

Added after submitting lab, because I felt like it and couldn't sleep: Amazon EC2: Dynamic DNS with YDNS.io

Working Notes

I managed to get this weeks lab done without any trouble, so I decided to make trouble for myself. What do I mean by that? After whizzing through the lab itself, I decided to change my username on the RHEL EC2 instance, and document it on this wiki, as the first of what I plan on making a series of pages added just for fun, titled Making Linux Your Own.

I also created a footer with a collabsible directory, using the info found here to make it collapsible.

Additionally, instead of using the GitHub website's wiki editor, I decided to use GVim, with the vim-instant-markdown, vim-gitgutter and NERDTree plugins, among several others.

Click for a full list of vim plug-ins I use
junegunn/vim-plug
tpope/vim-sensible
terryma/vim-multiple-cursors
itchyny/lightline.vim
junegunn/vim-easy-align
itchyny/vim-cursorword
itchyny/thumbnail.vim
itchyny/vim-highlighturl
itchyny/vim-grep
preservim/nerdtree
dense-analysis/ale
junegunn/fzf
junegunn/fzf.vim
airblade/vim-gitgutter
vim-scripts/taglist.vim
tomasiser/vim-code-dark
instant-markdown/vim-instant-markdown

Note: I have installed and uninstalled several plugins since writing this.

Lastly, and most headache-inducingly, (if that's even a real word), I decided to configure SSH so that if I was connection to the RHEL instance, it would automatically use the identity file, rather than making me specify it with the -i option. Unfortunately, because EC2 instances do not have static IPs, and because OpenSSH's ssh_config system does not support identifying hosts by CIDR notation, I was in a bit of a bind. The result was ec2-ssh-config.sh, which took longer than the lab itself to work on. It is based on the info in this ServerFault answer, and this page in the AWS docs. What it does is download the json file with the AWS IP address ranges, filter the JSON file to get the list of EC2 ranges in CIDR notation, and save that to a file, then add a Match entry to ~/.ssh/config, which would check if the host is an IP address in any of the EC2 IP ranges, and provide the identify file if it is. It's a bit of a hack, and is entirely dependent on the grepcidr command to work, but I'm still proud of it.

Image of GVIM Window

⚠️ **GitHub.com Fallback** ⚠️