Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
tab completion for ssh using FQDN
- X-seq: zsh-users 24075
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: tab completion for ssh using FQDN
- Date: Wed, 17 Jul 2019 15:41:34 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=473CrbsUytrc72disw7rdJImzin+AM6bGOjxmF7KGaw=; b=azdvsw5oLyfD11NBMoP83/esJQRzaZBMCTL0OSZ2GMQqtIeCMosBBieb3hrfiYUwMz S/6cGHvsgOR2S4wUiuzWS8fnHCJI1CDOqJ7YMIzGrKVK7hgsZIVUsWMIJFCmURPCnUZ6 OLmCkVYW4QIlzw0w1KtjHpTubn43GtyLZfmiDS6G1bz/1w+jOP0bPSfR8vP6kFc/lvbG XKysvQWa6IpOkwc6Y03X7QOJsmmSRpZ8AtpSQZHW6ysY24uSktmhy15jVsVVurkerKwi 9P5z/E28crsTld3s94aFM/53ku+2e5Q5/3CGFmAwy2JIOVJFqqrL9cR9LexjEy4NLqWR vhXw==
- 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
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author