* [Comm] работает ли sshd @ 2013-07-08 7:15 ` Andrey Liakhovets 2013-07-08 8:17 ` Andrew 0 siblings, 1 reply; 3+ messages in thread From: Andrey Liakhovets @ 2013-07-08 7:15 UTC (permalink / raw) To: community On Mon, 8 Jul 2013 13:01:32 +0700 Vyacheslav Brunev wrote: >Что говорит: >chkconfig --list sshd > >Если всё выкл. то: >chkconfig sshd on chkconfig задаёт запуск/останов сервисов при переходе системы между runlevel'ами (man chkconfig), в частности, при загрузке системы. Чтобы проверить и изменить состояние сервиса прямо сейчас, есть команда service: # service sshd status и если выключен, то: # service sshd start >8 июля 2013 г., 12:28 пользователь Andrew написал: > >> Всем здравствуйте! >> Взялся тут, значит, настраивать доступ по ssh на сервере. Просканировав >> порт 22 утилитой nmap выяснилось: >> *22/tcp closed ssh*. >> Попробовал добавить правило в iptables: >> *-A INPUT -i eth1 -p tcp -m tcp --dport 22 -j ACCEPT* (это строка в >> выводе iptables-save). >> >> Но по-прежнему порт закрыт и при попытке подключения ssh-клиент выдаёт: >> *ssh: connect to host 192.168.1.111 port 22: Connection refused*. >> >> Помогите, пожалуйста разобраться. Может я что-то упустил из виду? iptables стоит крутить после, когда с сервисом sshd разобрались :) Кстати, есть ещё такая команда control (man control), а среди доступных ей "ручек" есть пара в sshd: # control | grep sshd И, особенно для сервера, имеет смысл сделать доступ только по ключу: control sshd-password-auth disabled, затем перезапустить sshd, т.к. control только изменяет конфиг sshd. Естественно, положив в нужное место ключи. (Если всё это делаете не с консоли, а по ssh, то перезапускайте так: service sshd reload, тогда текущие ssh-соединения останутся живы, и вы сможете проверить результат и при ошибке откатить.) Андрей Ляховец ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] работает ли sshd 2013-07-08 7:15 ` [Comm] работает ли sshd Andrey Liakhovets @ 2013-07-08 8:17 ` Andrew 2013-07-08 9:08 ` Andrey Liakhovets 0 siblings, 1 reply; 3+ messages in thread From: Andrew @ 2013-07-08 8:17 UTC (permalink / raw) To: ALT Linux Community general discussions > iptables стоит крутить после, когда с сервисом sshd разобрались :) > > Кстати, есть ещё такая команда control (man control), > а среди доступных ей "ручек" есть пара в sshd: > # control | grep sshd > И, особенно для сервера, имеет смысл сделать доступ только по ключу: > control sshd-password-auth disabled, затем перезапустить sshd, > т.к. control только изменяет конфиг sshd. Естественно, положив в нужное > место ключи. > (Если всё это делаете не с консоли, а по ssh, то перезапускайте так: > service sshd reload, тогда текущие ssh-соединения останутся живы, и вы > сможете проверить результат и при ошибке откатить.) > > Андрей Ляховец > _______________________________________________ > community mailing list > community@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/community Спасибо! Вот сейчас, после того как ssh заработал на нужном порту, я его как раз и настраиваю. И как раз возникли проблемы с аутентификацией по ключу. :) Пожалуй стоит попробовать ваш подход. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] работает ли sshd 2013-07-08 8:17 ` Andrew @ 2013-07-08 9:08 ` Andrey Liakhovets 0 siblings, 0 replies; 3+ messages in thread From: Andrey Liakhovets @ 2013-07-08 9:08 UTC (permalink / raw) To: community On Mon, 08 Jul 2013 19:17:31 +1100 Andrew wrote: > >> iptables стоит крутить после, когда с сервисом sshd разобрались :) >> >> Кстати, есть ещё такая команда control (man control), >> а среди доступных ей "ручек" есть пара в sshd: >> # control | grep sshd >> И, особенно для сервера, имеет смысл сделать доступ только по ключу: >> control sshd-password-auth disabled, затем перезапустить sshd, >> т.к. control только изменяет конфиг sshd. Естественно, положив в нужное >> место ключи. >> (Если всё это делаете не с консоли, а по ssh, то перезапускайте так: >> service sshd reload, тогда текущие ssh-соединения останутся живы, и вы >> сможете проверить результат и при ошибке откатить.) >> >> Андрей Ляховец >> >Спасибо! Вот сейчас, после того как ssh заработал на нужном порту, я его как раз >и настраиваю. И как раз возникли проблемы с аутентификацией по ключу. :) >Пожалуй стоит попробовать ваш подход. Этот "подход" не решит проблем доступа по ключу. Он только запретит доступ по паролю. Андрей Ляховец ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-08 9:08 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-07-08 7:15 ` [Comm] работает ли sshd Andrey Liakhovets 2013-07-08 8:17 ` Andrew 2013-07-08 9:08 ` Andrey Liakhovets
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git