1

I have a problem with hints for the ssh command. When I press the tab key, the terminal displays all records from the /etc/host file in prompts. I use add-ons to block spam and advertisements in my browser. These add-ons save their records to /etc/hosts as follows:

127.0.0.1 domain 

e.g.

127.0.0.1 ads.xyz.com

Is it possible to exclude from the prompts those records which contain e.g. the address 127.0.0.1?

  • 1
    The offending part would be _known_hosts_real in /usr/share/bash-completion/bash_completion, where it does compgen -A hostname -P .... You could edit that, or you could move from /etc/hosts to using iptables rules to reject traffic to those hosts. – muru Jun 15 '18 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.