For Mac Complete Ssh Hosts Compreply Cur

For Mac Complete Ssh Hosts Compreply Cur Rating: 5,6/10 9990 votes

It seems that in Ubuntu the entries in /.ssh/knownhosts are hashed, so SSH completion cannot read them. This is a feature, not a bug. This is a feature, not a bug. Even by adding HashKnownHosts no to /.ssh/config and /etc/ssh/sshconfig I was unable to prevent the host hashing. Kext helper.

This code allows you to use hostname completion from NetInfo (bash has built-in hostname completion from /etc/hosts, but that's not really useful on Mac OS X) Add an entry to /etc/hosts for your computer's current IP address and a unique hostname (i.e. Foobar.foo), then ping foobar.foo. You ping yourself. If you happen to be using zsh, open a new Terminal window and typ 'ssh f' then hit the TAB key. It autocompletes to foobar.

Add machines records to NetInfo if you want, but for what you're trying to do, /etc/hosts should work.