1

When I try to use ssh to login locally, it closes the connection.

$ 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 

However, I can login locally

Chloe@xps ~ $ login login: Chloe Password: Last login: Thu May 22 00:01:42 from ... 

And open terminals fine. It is closing the connection from another computer as well. I followed all the steps in this answer (Why is my SSH connection being closed immediately after pubkey auth succeeds?) but it still fails.

$ ls -ld ~/.ssh drwx------+ 1 Chloe None 0 Jul 5 2014 /home/Chloe/.ssh 

All files are 600, group None.

$ 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 running as Cygwin service.

$ cygrunsrv -Q sshd Service : sshd Display name : CYGWIN sshd Current State : Running Controls Accepted : Stop Command : /usr/sbin/sshd -D 

Enabled public key authentication and recycled server.

$ grep Pubkey /etc/sshd_config PubkeyAuthentication yes 

The server log is empty.

$ ls -l /var/log/sshd.log -rw-r--r--+ 1 cyg_server None 0 Nov 21 22:55 /var/log/sshd.log 

cygwin 2.5.2, Windows 8.1

2
  • "The server log is empty" <-- I'd recommend fixing this before trying to figure out why logging in doesn't work. Commented Nov 22, 2016 at 13:48
  • @Patrick How do I fix it? Commented Nov 24, 2016 at 2:19

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.