19 ms·
Two more places to extract hostnames for ssh auto completion are .ssh/known_hosts and the .ssh/config. Or give zsh a try, simply autoload compinit and it will
by dryicerx 15y ago
Two more places to extract hostnames for ssh auto completion are .ssh/known_hosts and the .ssh/config.
Or give zsh a try, simply autoload compinit and it will do ssh/sftp auto completions along with a boatload more out of the box.
- xenomachina 15y agoIan MacDonald's bash completions (http://www.caliban.org/bash/ http://www.caliban.org/bash/) do this with known_hosts.
- mustpax 15y agoI usually set up my SSH autocompletes to read from known_hosts. The problem is that on some systems, like say Debian, the hostnames are hashed for security reasons. So you have to add the following line to your .ssh/config to get the hostnames back into a readable form. HashKnownHosts no