From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 51f15b63 for ; Thu, 18 Jul 2019 05:17:46 +0000 (UTC) Received: (qmail 24287 invoked by alias); 18 Jul 2019 05:17:31 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24077 Received: (qmail 20698 invoked by uid 1010); 18 Jul 2019 05:17:31 -0000 X-Qmail-Scanner-Diagnostics: from forward100j.mail.yandex.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25510. spamassassin: 3.4.2. Clear:RC:0(5.45.198.240):SA:0(-2.7/5.0):. Processed in 3.592108 secs); 18 Jul 2019 05:17:31 -0000 X-Envelope-From: m43cap@yandex.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf-ipv4.yandex.ru designates 5.45.198.240 as permitted sender) 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= Authentication-Results: mxback7o.mail.yandex.net; dkim=pass header.i=@yandex.com From: Colin Baxter To: TJ Luoma Cc: zsh-users@zsh.org Cc: Subject: Re: tab completion for ssh using FQDN References: X-Face: -P+89ASh_wrs;AUGm`!l[}/o-lyK}5W.gq\fkJ{#d6Gu,hWrZNz::iMm5PJb} __A96]-LUrl)X=uF=V|\3-\9/sXvBs/H Date: Thu, 18 Jul 2019 06:16:46 +0100 In-Reply-To: (TJ Luoma's message of "Wed, 17 Jul 2019 15:41:34 -0400") Message-ID: <87imrzyla9.fsf@yandex.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAACwAAAAMCAIAAACWSshgAAAABmJLR0QA/wD/AP+gvaeTAAAA nElEQVQ4je2UsQ7CMAxEj+BWauAX2fgsNj6kv0XJxWYp2BFiI2XhthdddCfLyW6ekRJeShfsr+iq eoKeHVUhOUMkWIa+DdaIoxMJmSYMMXjsX2IEslMpSJ+920lKgVk4qP0zK3B3IiFk69D+JRQIoSTE rJ3ENgqJZpCc28Xc5nUcnP6L+dS6mD8oUQJVyLI037YQ8n7tqyLBm6MqHvmOP4t7yU0MAAAAAElF TkSuQmCC MIME-Version: 1.0 Content-Type: text/plain Hello TJ, >>>>> TJ Luoma 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 ---------------------------------------------------------------------