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

Q: SSHD keeps failing to open PTY


Hello,

I've been trying to use several Cygnus ports of different versions of 
sshd on a Windows NT machine, but have not been quite succesful 
in opening interactive sessions. I hope this is an appropriate place 
to ask for help, as it has proven to be very hard to find accurate and 
up to date information regarding the usage of such ports.

Every time sshd seems to break down, apparently because it fails 
to allocate a pty. Below are two debug info examples based on 
V1.2.22 and V1.2.27:

Example 1:
========
ssh-1.2.22 for Win32, compiled using Cygwin32 Beta 19.1
by Raju Mathur (raju@sgi.com) aka OldMonk
debug: sshd version 1.2.22 []
debug: Initializing random number generator; seed file 
/etc/ssh_random_seed
log: Server listening on port 22.
log: Generating 768 bit RSA key.
log: RSA key generation complete.
debug: Server will not fork when running in debugging mode.
log: Connection from 192.168.0.1 port 2449
debug: Client protocol version 1.5; client software version 1.2.27
debug: Sent 768 bit public key and 1024 bit host key.
debug: Encryption type: idea
debug: Received session key; encryption turned on.
debug: Attempting authentication for borre.
debug: Login for user borre accepted without authentication.
debug: Allocating pty.
error: Failed to allocate pty. <-- TROUBLE!
debug: Forking shell.
debug: Entering interactive session.

Example 2:
========
debug: sshd version 1.2.27 []
debug: Initializing random number generator; seed file 
/etc/ssh_random_seed
log: Server listening on port 22.
log: Generating 768 bit RSA key.
Generating p:  .......++ (distance 76)
Generating q:  ...................++ (distance 364)
Computing the keys...
Testing the keys...
Key generation complete.
log: RSA key generation complete.
debug: Server will not fork when running in debugging mode.
log: Connection from 192.168.0.1 port 2482
debug: Client protocol version 1.5; client software version 1.2.27
debug: Sent 768 bit public key and 1024 bit host key.
debug: Encryption type: idea
debug: Received session key; encryption turned on.
debug: Installing crc compensation attack detector.
debug: Attempting authentication for borre.
log: Password authentication for borre accepted.
debug: Allocating pty.
debug: Forking shell.
debug: Entering interactive session.
error: Failed to disconnect from controlling tty. <-- TROUBLE!
debug: End of interactive session; stdin 0, stdout (read 0, sent 0), 
stderr 0 bytes.
debug: pty_cleanup_proc called
debug: chown /dev/tty0 0 0 failed: Function not implemented
debug: chmod /dev/tty0 0666 failed: No such file or directory
debug: Command exited with status 0.
debug: Received exit confirmation.
log: Closing connection to 192.168.0.1
============ end of examples ============

I would like to know why the pty allocation fails. What affects pty 
allocation? How may I solve the allocation problem (if that's what 
the problem is)? I've read several problem reports similar to mine, 
even by people on this list, but I have NOT been able to resolve the 
problem yet by using the suggestions done there. Do you happen 
to know of an accurate and detailed Cygnus port specific sshd 
FAQ?

Below is the sshd_config I used for all sshd versions I tested:

# This is sshd server systemwide configuration file.
Port 22
ListenAddress 0.0.0.0
HostKey /etc/ssh_host_key
RandomSeed /etc/ssh_random_seed
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationInterval 3600
PermitRootLogin yes
IdleTimeout 10m <--- NOT TOO SHORT!
IgnoreRhosts yes
StrictModes yes
QuietMode no
X11Forwarding yes
X11DisplayOffset 10
FascistLogging yes
PrintMotd yes
KeepAlive yes
SyslogFacility DAEMON
RhostsAuthentication no
RhostsRSAAuthentication no
RSAAuthentication yes
PasswordAuthentication yes
PermitEmptyPasswords yes
PrintMotd yes
UseLogin no
Umask 022
SilentDeny no

Regards and thanks in advance for any cooperation,
Borre Sanders


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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