Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am testing out running an SSH server on a local Windows VM.

I have installed FreeSSHd and set the command shell to "c:\cygwin\bin\sh --login -i" (bash as well) with "Use new console engine" unchecked. (When it was enabled no output would show through the ssh connection anyway)

The shell seems to work, but when connecting from my OS-X terminal using ssh all of the shell results comes out ill formatted.

      $ ls -al
          total 17
                  drwxr-xr-x+ 1 SYSTEM        Administrators 4096 Feb  2 01:00 .
drwxrwxrwt+ 1 Administrator Administrators    0 Feb  2 01:01 ..
                                                               -rw-------  1 SYSTEM        Administrators  128 Feb  2 01:30 .bash_history
                                                         -rwxr-xr-x  1 SYSTEM        Administrators 1150 Feb  2 00:55 .bash_profile
                                                   -rwxr-xr-x  1 SYSTEM        Administrators 3754 Feb  2 00:55 .bashrc
                                       -rwxr-xr-x  1 SYSTEM        Administrators 1461 Feb  2 00:55 .inputrc

Any ideas on why this is happening, how I can fix this?

share|improve this question
Try stty onlcr - translate newline to carriage-return+newline. – ott-- Jul 17 '13 at 18:10

Almost sounds like the two ends aren't passing terminal parameters properly.

Here are a few things to try. Set your terminal window to 80x24. This is the historical standard (TN3270) size of a terminal window. And/or reset the expectations on the size of the terminal on the remote side. There are various ways to accomplish this, such as eval $(resize) or stty cols X; stty rows Y (where X and Y is the width and height of your terminal)

share|improve this answer
I am not sure what the eval resize is supposed to do, but nothing changes, as for the stty, I get this: stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device – Tyler Clendenin Feb 2 '11 at 15:14

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.