У меня есть простое приложение, выполняющее несколько SFTP на сервере в течение дня - когда все в порядке, STDERR выглядит так (подробности обобщены, но всегда с одним и тем же пользователем с одного и того же клиента):
Команда: sftp -v -oIdentityFile=X -b Y user@host
STDERR:
Sun_SSH_1.1.9, SSH protocols 1.5/2.0, OpenSSL 0x1000212f
debug1: Reading configuration data /X/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to host [IP] port 22.
debug1: Connection established.
debug1: identity file X type -1
debug1: Logging to host: host
debug1: Local user: local Remote user: remote
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.1.9
… И многое другое потом…
Но иногда SFTP дает сбой, и клиент видит следующее:
Команда: sftp -v -oIdentityFile=X -b Y user@host
STDERR:
Sun_SSH_1.1.9, SSH protocols 1.5/2.0, OpenSSL 0x1000212f
debug1: Reading configuration data /X/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to host [IP] port 22.
debug1: Connection established.
debug1: identity file X type -1
debug1: Logging to host: host
debug1: Local user: local Remote user: remote
ssh_exchange_identification: Connection closed by remote host
debug1: Calling cleanup 0x39e20(0x0)
Couldn't read packet: Bad file number
Похоже, аутентификация прошла успешно, но на удаленном сервере не удалось запустить SSH. Копаясь в журнале SSH на удаленном сервере примерно в то же время, я вижу, что сообщения, регистрируемые почти для всех сеансов, имеют следующую последовательность из четырех шагов:
Feb 14 01:46:34 host sshd[102572]: FIPS integrity verification test failed.
Feb 14 01:47:01 host sshd[102572]: Accepted publickey for remote from client port N ssh2
Feb 14 01:47:13 host sshd[102572]: pam_unix(sshd:session): session opened for user remote by (uid=0)
Feb 14 01:47:35 host sshd[102572]: pam_unix(sshd:session): session closed for user remote
Однако примерно в это время были зарегистрированы следующие два сеанса, в которых не было шага «сеанс открыт»:
Feb 14 01:46:34 host sshd[104353]: FIPS integrity verification test failed.
Feb 14 01:47:01 host sshd[104353]: Accepted publickey for remote from client port N ssh2
Feb 14 01:47:35 host sshd[104353]: pam_unix(sshd:session): session closed for user remote
Feb 14 01:46:34 host sshd[104357]: FIPS integrity verification test failed.
Feb 14 01:47:01 host sshd[104357]: Accepted publickey for remote from client port N ssh2
Feb 14 01:47:35 host sshd[104357]: pam_unix(sshd:session): session closed for user remote
Поскольку в них отсутствует сообщение `` сеанс открыт '', это заставляет меня думать, что они могут быть связаны с завершенным сеансом SFTP, который также не показывает запуск SSH, но я бы подумал, что здесь должна быть зарегистрирована ошибка, а не просто отсутствие сообщения «сессия открыта». У меня нет доступа к удаленному серверу (linux), но мне сказали, что MaxStartups не установлен в sshd_config.
Есть ли предложения по определению, почему эти сеансы SFTP от одного и того же клиента / пользователя иногда завершаются после аутентификации?
заранее спасибо