zsh-users
 help / color / mirror / code / Atom feed
* tab completion for ssh using FQDN
@ 2019-07-17 19:41 TJ Luoma
  2019-07-17 20:35 ` Grant Taylor
  2019-07-18  5:16 ` Colin Baxter
  0 siblings, 2 replies; 3+ messages in thread
From: TJ Luoma @ 2019-07-17 19:41 UTC (permalink / raw)
  To: zsh-users

I have several hosts defined in ~/.ssh/config like so:

Host myhost
       HostName myhost.luo.ma
       User myuser
       Port 5555

Something changed, because now when I type "ssh my[tab]" I get "ssh
myhost.luo.ma" instead of "ssh myhost" which then fails because it
isn't using the port specified in ~/.ssh/config.

I _think_ it has to do with the ~/.ssh/known_hosts file, because if I
delete the entry from that file, tab completion seems to work as I
expect.

I've looked around for a solution, and it appears that if I add this line:

       HostKeyAlias myhost

then the short hostname gets uses for the known_hosts file, but I'm
not sure if that's a "good" solution or not.

Is there a way to tell zsh to only do tab-completion for ssh out of
~/.ssh/config and ignore ~/.ssh/known_hosts ?

Thanks!

--
TJ Luoma
TJ @ MacStories
Personal Website: luo.ma (aka RhymesWithDiploma.com)
Twitter: @tjluoma

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-18  5:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 19:41 tab completion for ssh using FQDN TJ Luoma
2019-07-17 20:35 ` Grant Taylor
2019-07-18  5:16 ` Colin Baxter

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).