From: "В.А. Илларионов" <gbimobou@gmail.com>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] SSH вход по ключу и паролю в зависимости от интерфейса
Date: Tue, 8 Dec 2015 11:19:41 +0800
Message-ID: <56664C4D.1050601@gmail.com> (raw)
In-Reply-To: <5665C384.4000203@gmail.com>
08.12.2015 01:36, Alexander Yereschenko пишет:
> Хочется странного: на машинке, которая работает и как шлюз в инет, стоит
> nx-server. Хочется настроить shhd так, чтобы извне для себя (для
> админства) был доступ только по ключу, а из локалки и (самое главное -
> тут, как я понял, без вариантов) для nx с локалхоста - по паролю.
>
> Настроил доступ по ключу - работает.
>
> В sshd_config c помощью:
> ====
> ListenAddress 192.168.0.1:22
> ListenAddress 127.0.0.1:22
> ListenAddress внешний_IP:другой_порт
> ====
> сделал для доступа снаружи нестандартный порт.
>
> По образцу на http://www.opennet.ru/openforum/vsluhforumID10/4945.html
> Добавил в sshd_config :
> (глобально запрещаем вход по паролю, но с локалки и локалхоста разрешаем)
> ====
> PasswordAuthentication no
> .....
> Match User user@192.168.0.*
> PasswordAuthentication yes
> Match User user@127.0.0.1
> PasswordAuthentication yes
Match Address 127.0.0.1
PasswordAuthentication yes
--
Мимо крокодил.
WBR, rednex CIO.
Viber = +7(964)103-65-67
JID = <mailto:>
Skype = $local_part@<mailto:>
next prev parent reply other threads:[~2015-12-08 3:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 17:36 Alexander Yereschenko
2015-12-07 17:57 ` Евгений Терешков
2015-12-08 3:19 ` В.А. Илларионов [this message]
2015-12-09 14:59 ` Alexander Yereschenko
2015-12-09 15:16 ` Michael Shigorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56664C4D.1050601@gmail.com \
--to=gbimobou@gmail.com \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git