From: Colin Baxter <m43cap@yandex.com>
To: TJ Luoma <luomat@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: tab completion for ssh using FQDN
Date: Thu, 18 Jul 2019 06:16:46 +0100 [thread overview]
Message-ID: <87imrzyla9.fsf@yandex.com> (raw)
In-Reply-To: <CADjGqHvQekBK0x_YTH_JXN3zZNunvP6MLsKE=wzCN5n68C+zwg@mail.gmail.com> (TJ Luoma's message of "Wed, 17 Jul 2019 15:41:34 -0400")
Hello TJ,
>>>>> TJ Luoma <luomat@gmail.com> 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
---------------------------------------------------------------------
prev parent reply other threads:[~2019-07-18 5:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 19:41 TJ Luoma
2019-07-17 20:35 ` Grant Taylor
2019-07-18 5:16 ` Colin Baxter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imrzyla9.fsf@yandex.com \
--to=m43cap@yandex.com \
--cc=luomat@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).