Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Ssh problem : solved but weird
Date: Tue, 12 Mar 2019 16:59:55
Message-Id: 2298260.f2ncSUg37b@dell_xps
In Reply to: Re: [gentoo-user] Ssh problem : solved but weird by Neil Bothwick
On Tuesday, 12 March 2019 15:12:46 GMT Neil Bothwick wrote:
> On 12 March 2019 15:10:24 GMT, Philip Webb <purslow@××××××××.net> wrote: > >190312 Philip Webb wrote: > >> Progress, but still a puzzle. I commented the lines in /etc/... > >> & when I use the IP, not the URL, the connection goes thro' ;
Good, we're getting somewhere. :-)
> >> when I use the URL, it still doesn't. Here's the output : > > ... skip ... > > > >> So why does IP vs URL make a difference ??
Because the config file is parsed and used as a literal match against whatever you type on the CLI. So, if you specify an IP address it will use the corresponding settings for this IP address only.
> >Thanks to Nuno Silva : it seems to use only the URL or IP, > >depending on which you specify in the config file. > >When I copy the 2 lines, but substitute the URL for the IP, > >the command also goes thro' properly.
Right, that's how it is meant to work. A literal match against what you type on the CLI.
> Give both the address and URL on the Host line.
Yes, Neil's suggestion will work, i.e. specify all potential Host invocations separated by white space on the Host line. Alternatively, you can still have the IP address as Host, but then set the URL as hostname, e.g.: Host 123.456.78.9 hostname example.com User my_username IdentityFile /home/user/.ssh/id_rsa KexAlgorithms +diffie-hellman-group1-sha1 I expect the above may fail if/when the IP address changes, but if nothing else it will give you reason to investigate what may be happening. -- Regards, Mick

Attachments

File name MIME type
signature.asc application/pgp-signature