ローカルを使用してログインしようとすると、ssh
接続が閉じます。
$ ssh -vvv Chloe@localhost
...
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 [email protected]
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 1952, received 1412 bytes, in 0.0 seconds
Bytes per second: sent 12675697.7, received 9169101.0
debug1: Exit status -1
ただし、ローカルでログインすることはできます。
Chloe@xps ~
$ login
login: Chloe
Password:
Last login: Thu May 22 00:01:42 from ...
端末を開くだけです。また、他のコンピュータへの接続も閉じます。私はこの答えのすべてのステップに従いました(公開鍵認証が成功した後にSSH接続がすぐに閉じられるのはなぜですか?)しかし、まだ失敗します。
$ ls -ld ~/.ssh
drwx------+ 1 Chloe None 0 Jul 5 2014 /home/Chloe/.ssh
すべてのファイルは600で、グループはありません。
$ ls -l .ssh
total 55
-rw------- 1 Chloe None 395 May 21 2014 authorized_keys
-rw------- 1 Chloe None 1638 Apr 6 2009 authorized_keys.old
-rw------- 1 Chloe None 668 Apr 6 2009 id_dsa
-rw------- 1 Chloe None 603 Apr 6 2009 id_dsa.pub
-rw------- 1 Chloe None 1675 Apr 6 2009 id_rsa
...
sshd
Cygwinサービスとして実行されます。
$ cygrunsrv -Q sshd
Service : sshd
Display name : CYGWIN sshd
Current State : Running
Controls Accepted : Stop
Command : /usr/sbin/sshd -D
公開鍵認証を有効にしてサーバーをリサイクルします。
$ grep Pubkey /etc/sshd_config
PubkeyAuthentication yes
サーバーログが空です。
$ ls -l /var/log/sshd.log
-rw-r--r--+ 1 cyg_server None 0 Nov 21 22:55 /var/log/sshd.log
セグウィン2.5.2、Windows 8.1