0
I have a fresh installation of Cygwin and I created a config file (just as I had in my old installation) with the info to connect to ssh to some hosts.
Now in this new fresh installation I have to write the whole alias for each hosts (as in ssh aws
or ssh azure
) because it does not autocomplete the host name when I push the tab key.
Once I have written the whole host name it reads the config file and it connects to the host, but not before.
My config file (which works in the old installation of Cygwin) contains info like:
Host aws
HostName xx.xxx.xx.xxx
User user
IdentityFile "~/.ssh/id_rsa"
I have tried changing permissions and owners of the .ssh folder and the config file itself but I can't make it work just as the old installation.
New version installed is 1.7.35 and the old one is 1.7.20
can you include examples of what you are writing and what you expect? I wonder if you need to say HOST * in ssh_config if you want something for any ssh regardless of what host is specified – barlop – 2015-04-12T20:17:16.617
Well my config file (which works in the old installation of Cygwin) contains info like:
Host aws HostName xx.xxx.xx.xxx User user IdentityFile "~/.ssh/id_rsa"
And what I want to get is that when I type just ´ssh aw´ press tab it gets autocompleted the host, so
ssh aws
in this case.By the way my config file name is "config" and it is inside .ssh folder. – gugol – 2015-04-13T06:52:18.600
Cygwin aside, does that even happen in linux? That tab autocomplete would check the ssh config file for autocompletion?! Also, did you mean HostName to be on a new line?(I edited your question to put HostName xx.xx.xx.xx on a new line). Maybe your old installation had a file called aws?!(so when you typed aw and pushed tab it autocompleted to aws) I cannot imagine tab autocompletion in the shell to check the ssh config file. – barlop – 2015-04-13T10:11:51.400
@barlop your edition is correct, it was my bad, thanks for that. But that was just a copy-paste typo and not the reason of the issue. Well, that is the behaviour I am used to in Cygwin, it autocompletes and then it asks for the password. – gugol – 2015-04-13T10:39:37.863
I think the solution could go this way: link but I can't try now.
– gugol – 2015-04-13T10:58:48.803Have you checked the old installation for a file or folder named aws? What if you do
ls aw<tab>
Does ssh aw<tab> produce aws, and ls aw<tab> not? Really you should try and think about this from the perspective of a computer, how what you want would work. If it did happen it'd obviously not be a built in feature. Do you seriously think that shell autocompetion is looking for ssh on the command line and doing a special autocomplete reading ssh's config file. Unless you have manually written or added a script for the shell to do that like the thing you link to. might do – barlop – 2015-04-13T11:47:08.983Let us continue this discussion in chat.
– barlop – 2015-04-13T12:10:04.140