Я использую OpenSSH для Windows (http://www.mls-software.com/opensshd.html). Сервер sshd работает нормально в Windows, и я могу аутентифицировать себя как на локальном хосте, так и на удаленном компьютере с Ubuntu. Но после авторизации соединение закрывается автоматически без выдачи терминала. Совместное использование полного вывода уровня отладки ssh -vvv localhost:

debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/Muneeb/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug1: Authentication succeeded (publickey).
Authenticated to localhost ([::1]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t3 r-1 i0/0 o0/0 fd 4/5 cc -1)

Connection to localhost closed by remote host.
Connection to localhost closed.
Transferred: sent 1960, received 2776 bytes, in 0.0 seconds
Bytes per second: sent 261477.0, received 370336.8
debug1: Exit status -1

Здесь он автоматически аутентифицируется с использованием открытого ключа localhost, но перед этим я также попытался войти в систему с паролем, и он аутентифицировался нормально, но снова соединение было закрыто с окончательным состоянием выхода 255 вместо -1 показанного в предыдущем случае.

0