> chown --from=CURRENT_OWNER:CURRENT_GROUP -R new_owner:new_group *
"Here’s how it works (note that any time you see “Mac” below, the feature also works on iDevices running iOS 10): Text or some other item is copied on one Mac. The device then advertises over Bluetooth that it has something in its clipboard, just as it would do if it had content available via Handoff. Unlike Handoff, though, there's no visual indicator on other Macs or iDevices that anything is ready to copy. Hit paste on the other Mac. There's a pause that accompanies the action—nearly unnoticeable for a snippet of text or a link but long enough to prompt a little progress bar popup for larger images or big chunks of text—during which Mac #2 requests the contents of Mac #1's clipboard, and Mac #1 sends it over. Though both of your devices need to be signed in to the same iCloud account to trust each other, your data never appears to touch Apple's servers—like Handoff, all communication is local. This also means that Bluetooth and Wi-Fi have to be enabled on both devices, and both devices need to be within range of each other for copying and pasting to work. You won't necessarily need an active Internet connection."
As anybody who deals with multiple servers in multiple AWS accounts knows, it can be a real pain to maintain an up-to-date
~/.ssh/config file. Most solutions I've found for managing this assume you only have one AWS account. I've decided to share my setup for how I deal with managing my ssh config file that contains entries from 4 different AWS accounts, two Linode accounts, and some other random entries.
If you want to cut to the chase, you can check out this project on Github.
. ├── aws │ ├── geoloqi.profile │ ├── geotrigger.profile │ ├── geotrigger-dev.profile │ └── esripdx.profile ├── ssh │ ├── _base.sshconfig │ ├── esripdx.sshconfig │ ├── geoloqi.sshconfig │ ├── geotrigger.sshconfig │ ├── geotrigger-dev.sshconfig │ └── personal.sshconfig ├── bash-complete.sh ├── rebuild-ssh-config.sh └── ssh-servers-from-aws.rb
The "aws" folder contains my AWS API key/secrets for each AWS account. For example:
export AWS_ACCESS_KEY=XXXXXXXXX export AWS_SECRET_KEY=XXXXXXXXX
(The reason I have "export" in there is so that I can source this file from bash, allowing me to also use the same set of files with the Amazon command line utils, switching accounts by sourcing each different file)
The "ssh" folder contains the generated and hand-edited ssh config files. I created a
_base.sshconfig file where I put global config data, such as:
Host * ServerAliveInterval 60 ForwardAgent yes IdentitiesOnly yes
personal.sshconfig file is a hand-edited file where I put a list of some of my Linodes and home servers. The other files are auto-generated by querying each AWS account for their list of servers.
bundle installto install the necessary gems
bash-complete.shfile from your
.bash_profileto enable autocomplete
~/.sshfolder that matches with the key listed on each EC2
To generate the ssh config file for an AWS account, run:
bundle exec ./ssh-servers-from-aws.rb example
Replace "example" with the name of your AWS profile. This will query your AWS account for all running servers, adding each to a file in the "ssh" folder. The following information will be pulled from each EC2:
After you generate the ssh configs for each AWS account, you'll need to update your master
rebuild-ssh-config.sh, which combines all your
ssh/*.sshconfig files into the master
~/.ssh/config file. Note that your previous
~/.ssh/config file will be overwritten, so make sure you move any important things into the "ssh" folder before you do so.
Now you are ready to go! You can do things like:
$ ssh e[TAB] auto-expands to
$ ssh example
Or if you have multiple servers with the same prefix,
$ ssh e[TAB][TAB] example-1 example-2
If you name your servers with common prefixes per account, or by prefixing types of machines with the same prefix (worker-* vs db-* for example) then the tab-complete becomes even more useful!