|
|
Create on-the-fly hostname lists for ssh tab completion
The macports suggestion is a good one, but IMO, includes too much. If you don't have macports installed, you can add the following to your .bash_profile (I wouldn't add it to my .bashrc, since that gets read in by cron jobs and remote commands).
There are a couple improvements here. First, this will also read in aliases in your ~/.ssh/config file. Secondly, it will ignore commented out entries in your ~/.ssh/known_hosts file. Finally, this is a function and not a static list. Thus, it is immediately aware of any new additions to either file (although on really slow machines it will be slower than a static list).
---
Create on-the-fly hostname lists for ssh tab completion
Nice job, Nem! I don't actually have a ~/.ssh/config file, so here's a modification to deal with that situation:
Create on-the-fly hostname lists for ssh tab completion
Thanks for the slick inclusion of .ssh/config. However, I had to make a quick tweak to 'awk' out the 3rd entry rather than the 2nd.
Create on-the-fly hostname lists for ssh tab completion
tcsh and/or zsh versions? I actually would find the aliases in config more useful than known_hosts I think? My user name is rarely the same on the box I'm logging into. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.07 seconds |
|