Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: tab completion for ssh using FQDN
- X-seq: zsh-users 24077
- From: Colin Baxter <m43cap@xxxxxxxxxx>
- To: TJ Luoma <luomat@xxxxxxxxx>
- Subject: Re: tab completion for ssh using FQDN
- Date: Thu, 18 Jul 2019 06:16:46 +0100
- Authentication-results: mxback7o.mail.yandex.net; dkim=pass header.i=@yandex.com
- Cc: zsh-users@xxxxxxx
- Cc:
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1563427009; bh=EW/ALHRrEf/KTrIvjwY2H+JtZFgGq16/2MXTQHeG/SA=; h=In-Reply-To:Subject:To:From:Cc:Cc:Date:References:Message-ID; b=MGiXPTA4TkD1jxCbJdjwzzQ6tRUjhXj571YkkQNn4BTK9s4v6dmxdOnAgAiD6+aIy 6RfWFJlFBPbLSQRdCz8ImvNXIkxrvxW23JWieBRuamRKgNm5X19hS2pPMgoBEsK2ZS ypqtqSkC5aJUoXFZmcxpXdSbE2a67gTIqA2k6pKQ=
- Face: iVBORw0KGgoAAAANSUhEUgAAACwAAAAMCAIAAACWSshgAAAABmJLR0QA/wD/AP+gvaeTAAAA nElEQVQ4je2UsQ7CMAxEj+BWauAX2fgsNj6kv0XJxWYp2BFiI2XhthdddCfLyW6ekRJeShfsr+iq eoKeHVUhOUMkWIa+DdaIoxMJmSYMMXjsX2IEslMpSJ+920lKgVk4qP0zK3B3IiFk69D+JRQIoSTE rJ3ENgqJZpCc28Xc5nUcnP6L+dS6mD8oUQJVyLI037YQ8n7tqyLBm6MqHvmOP4t7yU0MAAAAAElF TkSuQmCC
- In-reply-to: <CADjGqHvQekBK0x_YTH_JXN3zZNunvP6MLsKE=wzCN5n68C+zwg@mail.gmail.com> (TJ Luoma's message of "Wed, 17 Jul 2019 15:41:34 -0400")
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADjGqHvQekBK0x_YTH_JXN3zZNunvP6MLsKE=wzCN5n68C+zwg@mail.gmail.com>
Hello TJ,
>>>>> TJ Luoma <luomat@xxxxxxxxx> writes:
> 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 ?
I get satisfactory tab-completion by setting Host to a name but Hostname
to an IP address. Seems to work.
Best wishes,
--
Colin Baxter
www.Colin-Baxter.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68 2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------
The sole cause of all human misery is the inability of people to sit
quietly in their rooms. Blaise Pascal, 1670
---------------------------------------------------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author