SSH tab completion


/ Published in: Bash
Save to your folder(s)

tab completion is something we use all day long. put this into your .bash_profile. You can use tabs to auto complete the hostname for ssh calls.


Copy this code and paste it in your HTML
  1. complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.