This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

More on SSH problems....

After some recompiling and debug output, I am 
more baffled than ever.

To recap, I am trying to log on to SSH via 
localhost using a different user and DSA 
authentication.  This user will get on just fine if 
only an empty password is used.  Using DSA 
authentication succeeds and the user is logged 
on to the server with the motd printed, then the 
server dumps the channel.  I can't figure this 

As an aside, In channel.c in the function 
channel_handle_rfd, there is a check for len <= 
0 after a read on the rfd file descriptor which 
fails since read returns a 0.  According to the 
UNIX documentation, this should not be an 
error, but SSHD treats it as one and shuts down 
the channel.  Race condition?  Why can't it 
read anything from this file descriptor?  This 
only happens sometimes.

I invoke SSH as follows:
5:{596}:$ ssh  -vvv -o "userknownhostsfile 
/home/test/.ssh/known_hosts" -o "userk
hostsfile2 /home/test/.ssh/known_hosts" -l test 
localhost -i /home/test/.ssh/id_dsa

... and I get a login message, then the server 
dumps the channel.  There is no debug output 
saying why.  I modified the output of "Received 
SIGCHLD" to also show the child's exit status 
which is 255.  This only happens when there is 
a SIGTERM received?

When I invoke SSH with "-T" the server debug 
output looks like this:

debug1: Entering interactive session for SSH2.
debug1: fd 3 setting O_NONBLOCK
debug1: fd 7 setting O_NONBLOCK
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype 
session rchan 0 win 131072 max 32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: init
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with 
channel 0
debug1: server_input_channel_open: confirm 
debug1: server_input_channel_req: channel 0 
request shell reply 0
debug1: session_by_channel: session 0 
channel 0
debug1: session_input_channel_req: session 0 
req shell
debug1: fd 10 setting O_NONBLOCK
debug1: fd 9 setting O_NONBLOCK
debug1: fd 12 setting O_NONBLOCK
debug3: server_input_channel_req: success 1
debug1: Received SIGCHLD, errno 4, child exit 
status 255
debug2: notify_done: reading
debug1: channel 0: read<=0 rfd 10 len 0
debug1: channel 0: read failed
debug1: channel 0: close_read
debug1: channel 0: input open -> drain
debug2: channel 0: read 379 from efd 12
Write failed: Cannot send after transport 
endpoint shutdown
debug3: in fatal cleanup!
debug1: Calling cleanup 0x4274c0(0x0)
debug1: channel_free: channel 0: server-
session, nchannels 1
debug3: channel_free: status: The following 
connections are open:
  #0 server-session (t4 r0 i1/0 o0/0 fd -1/9)

debug3: channel_close_fds: channel 0: r -1 w 9 
e 12
debug1: Calling cleanup 0x41cb00(0x0)

I am dead in the water here.  Is this an 
impossible task, trying to use the DSA to log on 
with a different user than I am?

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]