![SSH를 통해 localhost에 로그인할 수 없지만 인증에 성공했습니다.](https://linux55.com/image/99191/SSH%EB%A5%BC%20%ED%86%B5%ED%95%B4%20localhost%EC%97%90%20%EB%A1%9C%EA%B7%B8%EC%9D%B8%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%A7%80%EB%A7%8C%20%EC%9D%B8%EC%A6%9D%EC%97%90%20%EC%84%B1%EA%B3%B5%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
로컬을 사용하여 로그인 하려고 하면 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, 윈도우 8.1