loading...

Discussion on: Bash Shell Tricks

Collapse
kav2k profile image
Alexander Kashev

Small correction: bash completion for SSH looks for $HOME/.ssh/config, not authorized_keys

Collapse
bhaskar_vk profile image
Bhaskar Karambelkar Author

Yikes my bad. Actually it should be $HOME/.ssh/known_hosts file for auto completing host names. You won't find host names in $HOME/.ssh/config unless you've explicitly put them there, but every host you connect to gets saved in known_hosts by default.

Collapse
kav2k profile image
Alexander Kashev

Yes, it does, but bash-completion does not read hosts from known_hosts - at least on my Ubuntu 16.04 machine.

It will, however, read both hostnames and host aliases from config.