This is the mail archive of the cygwin@cygwin.com 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]

Re: Can't spawn shell for authenticated user in SSHD (revisited)


I am taking a wild guess- when you ssh in, it spawns a shell and then 
still does some ssh-ish tasks. Maybe it can't complete them from the 
command shell.

Are you logging in or just firing off remote processes?

It might be worth trying to set your shell to /bin/bash, ssh in and see 
if you can then start a command shell. Maybe-

ssh machine "cd /cygdrive/c/path-to-batch-file; cmd /c mytest.bat; sleep 2"

(the 'sleep x' might not be necessary with ssh, but it is with rsh if 
you want all the output from the last command)

I don't have sshd running anywhere remotely, but I can rlogin to a 
machine running inetd, it starts a bash shell, and then I type "cmd" and 
it gives me a command shell.

HTH (or at least spawns some discussion),
Peter

John Fishbeck wrote:

> Hi all,
> 
> I posted the message appended at the end of this one last week, and didn't receive a _single_ response to it. This leads me to believe that either 1) I have unwittingly committed some horrendous faux pax, despite the fact that I did attempt to research this problem before posting to this list, or 2) this is a bizarre problem which others have not encountered nor know what to do about.
> 
> If (1) above, I sincerely apologize and ask forgiveness, and would urge some kind soul to take pity on me and direct me to the problem solution that I missed in my research. If (2), I guess I'm just going to have to abandon the Cygwin OpenSSH solution and figure out some other approach - perhaps MS telnet service (shudder...).
> 
> Anybody out there gonna take pity on a poor IT schmuck in need of help?
> 
> John Fishbeck
> MSU Physical Plant Computer Systems
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> I want merely the ability to do limited remote WINNT command prompt sys administration tasks without exposing myself to the plain text and implementation vulnerabilities of telent server; i.e., I want to launch /winnt/system32/cmd.exe upon logging in via a SSH client to SSHD on an NT 4.0, SP 6 system.
> 
> To that end I used the cygwin setup program to download and install from the Internet the openssh package. This process apparently worked correctly, as I can get components, including sshd, running. In fact, launching sshd in debug mode, I can use a ssh client on another machine and successfully (apparently, from the debug trace) authenticate to sshd. However, it looks as though when sshd proceeds to spawn my shell, there is some sort of a process launch/communication failure, with the following debug text emitted from sshd:
> 
> Accepted password for Administrator from 35.10.77.61 port 1540 ssh2
> debug1: Entering interactive session for SSH2.
> debug1: server_init_dispatch_20
> debug1: server_input_channel_open: ctype session rchan 0 win 8192 max 8192
> 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 session
> debug1: session_by_channel: session 0 channel 0
> debug1: session_input_channel_req: session 0 channel 0 request pty-req reply 0
> debug1: Allocating pty.
> debug1: session_pty_req: session 0 alloc /dev/tty0
> debug1: session_by_channel: session 0 channel 0
> debug1: session_input_channel_req: session 0 channel 0 request shell reply 0
>       0 [main] sshd 290 sync_with_child: child 300(0x148) died before initialization with status code 0x80
>     304 [main] sshd 290 sync_with_child: *** child state waiting for longjmp
> Disconnecting: fork failed: Resource temporarily unavailable
> debug1: Calling cleanup 0x414188(0x43e794)
> debug1: session_pty_cleanup: session 0 release /dev/tty0
> debug1: Calling cleanup 0x41eb24(0x0)
> debug1: channel_free: channel 0: server-session, nchannels 1
> debug1: Calling cleanup 0x4169cc(0x0)
> 
> The /etc/passwd entry for the user I'm logging in as looks like this:
> 
>   Administrator:::::/c:/c/winnt/system32/cmd.exe
> 
> and my mount environment looks like:
> 
>   C:\cygwin\bin on /usr/bin type system (textmode)
>   C:\cygwin\lib on /usr/lib type system (textmode)
>   C:\cygwin on / type system (textmode)
>   c: on /c type system (textmode)
> 
> It appears to me from the debug output that the cmd.exe process does get launched, but then something goes awry, and I have been unsuccessful in resolving this.
> 
> Can anyone help me with this? I did try to search the archives for references to this problem, but found nothing that seemed to be an exact match to this scenario.
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 


-- 
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]

--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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