Hi everybody, I got a strange error message when I used the openssh. When I run it with debug mode, like this: # /usr/local/sbin/sshd -d I can open the session via ssh command. However, when I run with daemon mode, the ssh client was closed down and threw out the following message: debug1: dispatch_run:dispatch done debug1: Authentication succeeded (keyboard-interactive). debug1: channel 0: new [client-session] debug2: channel 0: send open debug1: Entering interactive session. debug1: channel 0: free: client-session, nchannels 1 Read from remote host localhost: Connection reset by peer Connection to localhost closed. debug1: Transferred: stdin 0, stdout 0, stderr 92 bytes in 0.0 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 18444.3 debug1: Exit status -1 Any help? Thanks in advance, Anqin
On Wed, 19 Mar 2008, qin an wrote:> Hi everybody, > > I got a strange error message when I used the openssh. > When I run it with debug mode, like this: > > # /usr/local/sbin/sshd -d > > I can open the session via ssh command. However, > when I run with daemon mode, the ssh client was > closed down and threw out the following message: > > debug1: dispatch_run:dispatch done > debug1: Authentication succeeded (keyboard-interactive). > debug1: channel 0: new [client-session] > debug2: channel 0: send open > debug1: Entering interactive session. > debug1: channel 0: free: client-session, nchannels 1 > Read from remote host localhost: Connection reset by peer > Connection to localhost closed. > debug1: Transferred: stdin 0, stdout 0, stderr 92 bytes in 0.0 seconds > debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 18444.3 > debug1: Exit status -1What does the server say when it disconnects the client? -d
On Mon, 21 Apr 2008, Ian jonhson wrote:> mmmh..... That my be a alternative. But how to open the syslog in SSHD? > I tried to add the line "syslog(LOG_INFO,"%s: here",__func__)" to get debug > information, however nothing output in /var/log/messages. > > Anything I miss? >SSHD privsep child according to your strace log tried to contact syslogd right after privsep monitor crashed, so there is generally nothing you should do in addition to what I advised. But if you want to explicitly add debug logging, you should invoke openlog() right before invoking syslog(), and invoke closelog() after you are done with syslogging. Consult manpages for details of those functions. -- Sincerely Your, Dan.