If you’ve changed keys, you will need to delete a ssh key from /etc/known_hosts file.
You can edit it manually using an editor such as vi or vim.
Or you can use ssh-keygen command with -R option to delete the hostname or IP address.
ssh-keygen -f "~/.ssh/known_hosts" -R "xxx.xxx.xxx.xxx"
Here’s how to copy files from one directory to another.
rsync -arvz /dir1 /dir2 >> /tmp/rsync.log &
Format: rsynch –options source destination
- -a archive mode
- -v verbose
- -p keep permissions
- -z zipped during transfer
- -r recursive
Here’s how to get a list of EC2 tags.
aws ec2 describe-tags \
--filters "Name=resource-id,Values=i-xxxxxxxxxxxxx" \
--query 'Tags[Key,Value]' \
--profile default \
--region us-east-1 \
Here’s a typical setup for an Outbound DNS server.
What are unbound servers? Unbound servers are a validating, recursive and caching DNS server
Install Unbound DNS
access-control: 0.0.0.0/0 allow
local-zone: "10.in-addr.arpa." nodefault
Unbound Start, Stop, Restart and Status
service outbound start | stop | restart | status
.bash_profile is executed for login shells. .bashrc is executed for interactive non-login shells. When you login, .bash_profile is executed. If you are already logged in, .bashrc is executed. .bashrc is also executed when you start a new bash using /bin/bash.