Bash autocompletion is very handy especially if you are using ssh to login to the same hosts over and over again.
Unfortunately breezy includes a minor change to the ssh client configuration that will cause this to break.
If you look in a standard known_hosts file in your ssh directory you should see a human readable part including the hostname and IP followed by the usual mumbo jumbo.
In the breezy standard setup the contents are all hashed, so you can’t make out any of the contents.
The breezy ssh client config located in:
/etc/ssh/ssh_config
Includes the following line at the bottom of the file:
HashKnownHosts yes
which means that by default autocompletion will fail miserably as the hostname / IP will not be readable, as it is stored in a hash.
Simple solution.
Change the line to read:
HashKnownHosts no
Remove the existing ssh history:
cd .ssh
rm known_hosts
Make sure that autocomplete is on in your profile by checking that the following section in your .bashrc file is uncommented:
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
And your autocompletion should start working again.
There’s probably a very good reason why the package maintainers changed the default, but it took me some time to work out why my autocompletion wasn’t working
*sigh*
Leave a Reply