Re: setting username in ./ssh/config

2015-05-06 Пенетрантность Vasily Ivanov

On 2015-05-06 1302 (+0300), Hleb Valoshka wrote:

Возможно я не правильно понимаю man 5 ssh_config, но вот такой конфиг:


В самом начале мана:

For each parameter, the first obtained value will be used.  The
configuration files contain sections separated by “Host”
specifications, and that section is only applied for hosts that
match one of the patterns given in the specification.  The matched
host name is the one given on the command line.

Since the first obtained value for each parameter is used, more
host-specific declarations should be given near the beginning of the
file, and general defaults at the end.

Так что выглядеть должно так:

Host host1
User login2

Host host2
HostName fqdn2

Host *
User login1


--
To UNSUBSCRIBE, email to debian-russian-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150506101953.ga4...@roadwarrior.8p8c.net



Re: setting username in ./ssh/config

2015-05-06 Пенетрантность Hleb Valoshka
On 5/6/15, Eugene Berdnikov  wrote:

>  В самом начале man ssh_config(5) сказано:
>
>  For each parameter, the first obtained value will be used.
>  ...
>  Since the first obtained value for each parameter is used, more
> host-spe-
>  cific declarations should be given near the beginning of the file, and
>  general defaults at the end.

О, спасибо, слона-то я и не заметил.


Re: setting username in ./ssh/config

2015-05-06 Пенетрантность Eugene Berdnikov
On Wed, May 06, 2015 at 01:02:42PM +0300, Hleb Valoshka wrote:
> Возможно я не правильно понимаю man 5 ssh_config, но вот такой конфиг:
> 
> User login1
> 
> Host host1
> User login2
> 
> Host host2
> HostName fqdn2
> 
> 
> должен работать следующим образом: если я захожу на host1, то мой
> логин должет быть login2, если я захожу на host2 или другой хост, то
> логин должен быть login1.
> 
> Или я не прав, или в OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015 есть 
> баг.

 В самом начале man ssh_config(5) сказано:

 For each parameter, the first obtained value will be used.
 ...
 Since the first obtained value for each parameter is used, more host-spe-
 cific declarations should be given near the beginning of the file, and
 general defaults at the end.
-- 
 Eugene Berdnikov


-- 
To UNSUBSCRIBE, email to debian-russian-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150506100854.gu3...@protva.ru



Re: setting username in ./ssh/config

2015-05-06 Пенетрантность Hleb Valoshka
On 5/6/15, Mikhail A Antonov  wrote:
> А разве не так должно быть? (У тебя первой строки не хватает)
>
> Host *
>  user login1
>
> Host host1
>  user login2
>
> Host host2
>  hostname fqdn2


Ничего от этого не поменялось.


Re: setting username in ./ssh/config

2015-05-06 Пенетрантность Mikhail A Antonov
06.05.2015 13:02, Hleb Valoshka пишет:
> Возможно я не правильно понимаю man 5 ssh_config, но вот такой конфиг:
>
> User login1
>
> Host host1
> User login2
>
> Host host2
> HostName fqdn2
>
>
> должен работать следующим образом: если я захожу на host1, то мой
> логин должет быть login2, если я захожу на host2 или другой хост, то
> логин должен быть login1.
>
> Или я не прав, или в OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015 есть 
> баг.

А разве не так должно быть? (У тебя первой строки не хватает)

Host *
 user login1

Host host1
 user login2

Host host2
 hostname fqdn2


-- 
Best regards,
Mikhail
-
WWW: http://www.antmix.ru/
XMPP: ant...@stopicq.ru



signature.asc
Description: OpenPGP digital signature


setting username in ./ssh/config

2015-05-06 Пенетрантность Hleb Valoshka
Возможно я не правильно понимаю man 5 ssh_config, но вот такой конфиг:

User login1

Host host1
User login2

Host host2
HostName fqdn2


должен работать следующим образом: если я захожу на host1, то мой
логин должет быть login2, если я захожу на host2 или другой хост, то
логин должен быть login1.

Или я не прав, или в OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015 есть баг.