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
1 On Tuesday, 12 March 2019 15:12:46 GMT Neil Bothwick wrote:
2 > On 12 March 2019 15:10:24 GMT, Philip Webb <purslow@××××××××.net> wrote:
3 > >190312 Philip Webb wrote:
4 > >> Progress, but still a puzzle. I commented the lines in /etc/...
5 > >> & when I use the IP, not the URL, the connection goes thro' ;
6
7 Good, we're getting somewhere. :-)
8
9
10 > >> when I use the URL, it still doesn't. Here's the output :
11 > > ... skip ...
12 > >
13 > >> So why does IP vs URL make a difference ??
14
15 Because the config file is parsed and used as a literal match against whatever
16 you type on the CLI.
17
18 So, if you specify an IP address it will use the corresponding settings for
19 this IP address only.
20
21
22 > >Thanks to Nuno Silva : it seems to use only the URL or IP,
23 > >depending on which you specify in the config file.
24 > >When I copy the 2 lines, but substitute the URL for the IP,
25 > >the command also goes thro' properly.
26
27 Right, that's how it is meant to work. A literal match against what you type
28 on the CLI.
29
30
31 > Give both the address and URL on the Host line.
32
33 Yes, Neil's suggestion will work, i.e. specify all potential Host invocations
34 separated by white space on the Host line. Alternatively, you can still have
35 the IP address as Host, but then set the URL as hostname, e.g.:
36
37 Host 123.456.78.9
38 hostname example.com
39 User my_username
40 IdentityFile /home/user/.ssh/id_rsa
41 KexAlgorithms +diffie-hellman-group1-sha1
42
43 I expect the above may fail if/when the IP address changes, but if nothing
44 else it will give you reason to investigate what may be happening.
45
46 --
47 Regards,
48 Mick

Attachments

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