4

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?

2
  • 1
    Try stty onlcr - translate newline to carriage-return+newline. Commented Jul 17, 2013 at 18:10
  • I am not on OSX anymore, so I won't be able to test any additional responses Commented Feb 9, 2017 at 21:16

1 Answer 1

1

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)

1
  • 1
    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 Commented Feb 2, 2011 at 15:14

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.