Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having trouble connecting to a Cygwin 1.7.11 instance. I get the error "server refused to allocate pty" when logging in via SSH.

As way of background, I'm in the process of migrating a working Git/gitosis server/repository deployed to Cygwin 1.7.1 to a new server. The original installation followed these steps: http://www.shannoncornish.com/blog/2009/04/git-server-windows-2008/

I'm attempting to follow the same steps now but I'm running into trouble, I think as a result of Cygwin 1.7.11 (the latest version) no longer support TTY. In the ssh-host-config steps, the instructions say to enter the following for "Enter the value of CYGWIN for the daemon: []":

binmode tty ntsec 

Here's the trouble:

  1. When I set it up for tty and connect I enter a username and then get this error:

    Server refused to allocate pty

    "tty" option detected in CYGWIN environment variable.

    CYGWIN=tty is no longer supported. Please remove it from your CYGWIN environment variable and use a terminal emulator like mintty, xterm, or rxvt.

  2. If I redo the SSH setup (http://www.kgx.net.nz/2010/03/cygwin-sshd-and-windows-7/) and use:

    binmode mintty ntsec

    Then I just get the following error when trying to connect:

    Server refused to allocate pty

  3. Updating the cygwin.bat to change "set CYGWIN=binmode tty ntsec" (from Shannon instructions) to "set CYGWIN=binmode mintty ntsec" has no affect on the errors.

  4. Some instructions online say that this pty error can happen because the tty and pty devices are missing and recommend using /sbin/MAKEDEV to correct the issue but Cygwin doesn't have MAKEDEV, from what I can tell.

  5. I would re-install Cygwin 1.7.1 on the new server to avoid this issue with 1.7.11 but I didn't see any obvious way to download earlier releases of Cygwin itself (as opposed to the optional installation packages).

I appreciate any suggestions on how to address these issues.

share|improve this question
    
Still curious about this issue but I've found a way to migrate the old Cygwin installation to the new server and get it configured for SSH by following kgx.net.nz/2010/03/cygwin-sshd-and-windows-7 then the ssh-host-config section of shannoncornish.com/blog/2009/04/git-server-windows-2008 –  jlpp Mar 16 '12 at 21:53
    
did you ever figure out how to get rid of the "CYGWIN=tty is no longer supported" error message? I have a Windows 2003 server running the latest version of CYGWIN and that error is quite annoying! thxs –  Jean Gionet Mar 20 '12 at 14:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.