--- a/ssh.rst Sat May 21 00:10:10 2016 +0300
+++ b/ssh.rst Sat May 21 10:41:58 2016 +0300
@@ -14,7 +14,12 @@
Maintaining key pair.
=====================
-::
+
+Check available key types::
+
+ $ ssh -Q key
+
+Generate keys::
$ ssh-keygen -t dsa # for DSA
$ ssh-keygen -t rsa # for RSA
@@ -109,8 +114,7 @@
==========================
* Install base packages and openssh.
-* Set CYGWIN env var to 'binmode ntsec'.
-* Create Windows user.
+* Create Windows user and set its password.
* Recreate /etc/passwd::
$ mkpasswd -l -u user >>/etc/passwd
@@ -141,6 +145,11 @@
$ net stop sshd
$ cygrunsrv -E sshd
+To delete service::
+
+ $ cygrunsrv -E sshd
+ $ cygrunsrv -R sshd
+
If you have ``connection closed`` error check permission for ``/home/*/.ssh``
directories. If you start service from ``user`` account - add write permission
to ``/home/*/.ssh``. I fix by::
@@ -148,20 +157,25 @@
$ rm -r /home/*/.ssh
cmd> icacls c:\opt\cygwin\home /t /grant:r cyg_server:(f)
-Запускаем SSH server на правах произвольного пользователя.
-----------------------------------------------------------
+In order to enable logging from ``sshd`` uncomment in ``/etc/ssh/sshd_config``::
+
+ SyslogFacility AUTH
+ LogLevel INFO
-* Создаем пользователя, например с именем user, задаем ему пароль, права (т.е.
- в какие группы будет входить) и т.д., пользователя не блокируем.
-* В консоле MMC добавляем оснастку "Параметры безопасности". Модифицируем
- параметры:
+and start syslogd from ``inetutils`` package (don't forget to restart
+``sshd``!)::
+
+ $ /bin/syslogd-config
+ $ net start syslogd
- "Параметры безопасности" --> "Локальные политики" --> "Назначение прав
- пользователя." --> "Вход в качестве службы" --> добавить 'user'.
+Check ``/var/log/messages`` for logging messages.
+
+.. note::
+
+ In order to allow pubkey login and to avoid error::
- "Параметры безопасности" --> "Локальные политики" --> "Назначение прав
- пользователя" --> "Отклонить локальный вход" --> удалить 'user' (если был
- установлен).
+ userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes
- XXX "Принудительное удаленное завершение."
+ add ``PubkeyAcceptedKeyTypes *`` or ``PubkeyAcceptedKeyTypes=+ssh-dss`` to
+ ``/etc/ssh/sshd_config`` but DSS keys are depricated at all.