ssh to windows, terminal doesn't work.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ssh to windows, terminal doesn't work.

Peter Silva

I enabled ssh server on a windows desktop, and I can now ssh to it from my ubuntu laptop, and run cmd.exe, powershell and bash (WSL) which all work fine, except that in none of them do terminal applications work properly.  *man* shows me the the first page, and then subsequent pages are scrunched on the last line.  vim does very weird stuff.  the whole window goes blank when I delete a line, ^L brings it back, but the cursor is always off by one line.  it's unusable.

I tried asking on an MS forum, no response so far.  Any ideas what to look at?


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ssh to windows, terminal doesn't work.

Tedd M. V.
Peter Silva <[hidden email]> writes:

> I enabled ssh server on a windows desktop, and I can now ssh to it from my ubuntu laptop, and run cmd.exe, powershell and bash (WSL) which all work
> fine, except that in none of them do terminal applications work properly. *man* shows me the the first page, and then subsequent pages are scrunched on
> the last line. vim does very weird stuff. the whole window goes blank when I delete a line, ^L brings it back, but the cursor is always off by one line. it's
> unusable.
>
> I tried asking on an MS forum, no response so far. Any ideas what to look at?

Some application don't work unless run on a proper Terminal emulator,
for example I use Emacs for many things but both Terms don't work with
nothing that created any sort of 'graphics'.

Try Putty, it may be more robust.

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GAT d- s+:+ a? C++++ UL++++ P+ L+++ E+ W+++ N+ o-- K+ w
O-- M- V- PS++ PE Y+ PGP++ t+ 5 X+ R tv- b+++ DI-- D+
G++ e* h! r- z*
------END GEEK CODE BLOCK------

GPG: 37219EA0D04C8D3C
Keybase: tmv
Ring: tmv
Cryptocat: tmv
Bitmessage: BM-2cSx4RVaXbRvWmPtRsdoW25f8wipSMVRAG
Signal: Upon request | Bajo solicitación

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (847 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ssh to windows, terminal doesn't work.

Peter Silva
putty exists on ubuntu! Cool. I learned something... installed it, putty behaves the same (terminal settings are
all wrong, editing files results in blank screens).  Did you notice that I am ssh'ing TO windows... not from windows?
my laptop is ubuntu, and I am remoting into a windows 10 box.


On Sun, Sep 23, 2018 at 4:07 AM Tedd M. V. <[hidden email]> wrote:
Peter Silva <[hidden email]> writes:

> I enabled ssh server on a windows desktop, and I can now ssh to it from my ubuntu laptop, and run cmd.exe, powershell and bash (WSL) which all work
> fine, except that in none of them do terminal applications work properly. *man* shows me the the first page, and then subsequent pages are scrunched on
> the last line. vim does very weird stuff. the whole window goes blank when I delete a line, ^L brings it back, but the cursor is always off by one line. it's
> unusable.
>
> I tried asking on an MS forum, no response so far. Any ideas what to look at?

Some application don't work unless run on a proper Terminal emulator,
for example I use Emacs for many things but both Terms don't work with
nothing that created any sort of 'graphics'.

Try Putty, it may be more robust.

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GAT d- s+:+ a? C++++ UL++++ P+ L+++ E+ W+++ N+ o-- K+ w
O-- M- V- PS++ PE Y+ PGP++ t+ 5 X+ R tv- b+++ DI-- D+
G++ e* h! r- z*
------END GEEK CODE BLOCK------

GPG: 37219EA0D04C8D3C
Keybase: tmv
Ring: tmv
Cryptocat: tmv
Bitmessage: BM-2cSx4RVaXbRvWmPtRsdoW25f8wipSMVRAG
Signal: Upon request | Bajo solicitación
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ssh to windows, terminal doesn't work.

Peter Flynn
On 24/09/18 03:32, Peter Silva wrote:
> putty exists on ubuntu! Cool. I learned something... installed it,
> putty behaves the same (terminal settings are all wrong, editing
> files results in blank screens).

Once you log in, what environment does Windows sshd put you *into*?
Windows Terminal? Command Prompt?

> Did you notice that I am ssh'ing TO windows... not from windows?

Yes, and I didn't know you could do that. My immediate suspect is the
windows ssh server: what is it, where did it come from, who wrote it,
and is there a forum for it?

> Peter Silva <[hidden email]>
> writes:
>
>> I enabled ssh server on a windows desktop, and I can now ssh to it
>> from my ubuntu laptop, and run cmd.exe, powershell and bash (WSL)
>> which all work fine, except that in none of them do terminal
>> applications work properly.

I wouldn't expect any of them to work as terminal applications: they
expect to "see" the Windows window manager, not whatever ssh or puTTY
provides. But I'm not a frequent Windows users, so I may be wrong on this.

I have used remmina successfully to log into a Windows system remotely.
This gets you full desktop emultion, so it's slow, but it seems to work.

///Peter

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ssh to windows, terminal doesn't work.

Robert Heller
In reply to this post by Peter Silva
At Sun, 23 Sep 2018 22:32:48 -0400 "Ubuntu user technical support,  not for general discussions" <[hidden email]> wrote:

>
>
>
> putty exists on ubuntu! Cool. I learned something... installed it, putty
> behaves the same (terminal settings are
> all wrong, editing files results in blank screens).  Did you notice that I
> am ssh'ing TO windows... not from windows?
> my laptop is ubuntu, and I am remoting into a windows 10 box.

What exactly is the point of putty on a *Linux* machine?  There are many
flavors of terminal (xterm, gnome-terminal, any many others) + slogin/ssh/scp,
etc. as part of the base install of *any* Linux distro...

>
>
> On Sun, Sep 23, 2018 at 4:07 AM Tedd M. V. <[hidden email]> wrote:
>
> > Peter Silva <[hidden email]> writes:
> >
> > > I enabled ssh server on a windows desktop, and I can now ssh to it from
> > my ubuntu laptop, and run cmd.exe, powershell and bash (WSL) which all work
> > > fine, except that in none of them do terminal applications work
> > properly. *man* shows me the the first page, and then subsequent pages are
> > scrunched on
> > > the last line. vim does very weird stuff. the whole window goes blank
> > when I delete a line, ^L brings it back, but the cursor is always off by
> > one line. it's
> > > unusable.
> > >
> > > I tried asking on an MS forum, no response so far. Any ideas what to
> > look at?
> >
> > Some application don't work unless run on a proper Terminal emulator,
> > for example I use Emacs for many things but both Terms don't work with
> > nothing that created any sort of 'graphics'.
> >
> > Try Putty, it may be more robust.
> >
> > --
> > -----BEGIN GEEK CODE BLOCK-----
> > Version: 3.12
> > GAT d- s+:+ a? C++++ UL++++ P+ L+++ E+ W+++ N+ o-- K+ w
> > O-- M- V- PS++ PE Y+ PGP++ t+ 5 X+ R tv- b+++ DI-- D+
> > G++ e* h! r- z*
> > ------END GEEK CODE BLOCK------
> >
> > GPG: 37219EA0D04C8D3C
> > Keybase: tmv
> > Ring: tmv
> > Cryptocat: tmv
> > Bitmessage: BM-2cSx4RVaXbRvWmPtRsdoW25f8wipSMVRAG
> > Signal: Upon request | Bajo solicitación
> > --
> > ubuntu-users mailing list
> > [hidden email]
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> >
> MIME-Version: 1.0
>
--
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
[hidden email]       -- Webhosting Services
                                                   


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ssh to windows, terminal doesn't work.

Ingolf Steinbach
In reply to this post by Peter Silva
Am Sa., 22. Sep. 2018 um 05:04 Uhr schrieb Peter Silva <[hidden email]>:
> I enabled ssh server on a windows desktop, and I can now ssh to it from my ubuntu laptop, and run cmd.exe, powershell and bash (WSL) which all work fine, except that in none of them do terminal applications work properly.

Peter, can you give some more information on your environment:
1. "echo $TERM" on your ubuntu laptop
2. is there a concept of TERM variable in your windows environment?
3. "echo $TERM" in the bash on Windows (started via ssh) -- does it
match the output of item 1 above? (usually your ssh client should
forward that setting to the remote server so that applications running
there will use control sequences which are appropriate for your local
terminal)
4. does explicitly setting the TERM environment variable in your
(remote) bash to the same value as in item 1 help?
5. maybe you are missing some terminal support files/packages on
windows, so the remote applications would not know how to deal with
your (local) terminal?

Kind regards
Ingolf

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ssh to windows, terminal doesn't work.

Peter Silva
In reply to this post by Peter Flynn

On Mon, Sep 24, 2018 at 3:31 AM Peter Flynn <[hidden email]> wrote:
On 24/09/18 03:32, Peter Silva wrote:
> putty exists on ubuntu! Cool. I learned something... installed it,
> putty behaves the same (terminal settings are all wrong, editing
> files results in blank screens).

Once you log in, what environment does Windows sshd put you *into*?
Windows Terminal? Command Prompt?


I get CMD.  I can then type powershell, or bash (it has WSL also...) and they both startup,
but my terminal doesn't work.

The TERM setting is xterm-256color ... which is passed by the ssh client (plain old ssh on my ubuntu box) to Windows ssh server.
 
> Did you notice that I am ssh'ing TO windows... not from windows?

Yes, and I didn't know you could do that. My immediate suspect is the
windows ssh server: what is it, where did it come from, who wrote it,
and is there a forum for it?


It is a built-in part of windows 10 for the last year or so (maybe only since the spring?)
Just used control panel to enable the optional feature.

I have used Terminal Services before, I would really prefer an SSH session.
-
 
> Peter Silva <[hidden email]>
> writes:
>
>> I enabled ssh server on a windows desktop, and I can now ssh to it
>> from my ubuntu laptop, and run cmd.exe, powershell and bash (WSL)
>> which all work fine, except that in none of them do terminal
>> applications work properly.

I wouldn't expect any of them to work as terminal applications: they
expect to "see" the Windows window manager, not whatever ssh or puTTY
provides. But I'm not a frequent Windows users, so I may be wrong on this.

I have used remmina successfully to log into a Windows system remotely.
This gets you full desktop emultion, so it's slow, but it seems to work.

///Peter

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ssh to windows, terminal doesn't work.

Peter Silva
In reply to this post by Ingolf Steinbach


On Mon, Sep 24, 2018 at 12:36 PM Ingolf Steinbach <[hidden email]> wrote:
Am Sa., 22. Sep. 2018 um 05:04 Uhr schrieb Peter Silva <[hidden email]>:
> I enabled ssh server on a windows desktop, and I can now ssh to it from my ubuntu laptop, and run cmd.exe, powershell and bash (WSL) which all work fine, except that in none of them do terminal applications work properly.

Peter, can you give some more information on your environment:
1. "echo $TERM" on your ubuntu laptop
 
blacklab is a laptop running completely ordinary Ubuntu 18.04, default window manager, gnome terminal, bog standard.

blacklab% echo $TERM
xterm-256color
blacklab%ssh alu
 
2. is there a concept of TERM variable in your windows environment?
 
Alu is a running window10 home (which means no remote desktop ;-()
When I ssh in, it puts me in a cmd shell:

Microsoft Windows [Version 10.0.17134.286]                                                                                      
(c) 2018 Microsoft Corporation. All rights reserved.                                                                            

ender@ALU C:\Users\Ender>set TERM                                                                                               
TERM=xterm-256color                                                                                                             

ender@ALU C:\Users\Ender>

3. "echo $TERM" in the bash on Windows (started via ssh) -- does it
match the output of item 1 above? (usually your ssh client should
forward that setting to the remote server so that applications running
there will use control sequences which are appropriate for your local
terminal)

yes.
 
4. does explicitly setting the TERM environment variable in your
(remote) bash to the same value as in item 1 help?

It is already the same, so no, that did not help.
 
5. maybe you are missing some terminal support files/packages on
windows, so the remote applications would not know how to deal with
your (local) terminal?


great idea.  But I don't know if the tranmission of TERM variable is just ssh client and 
server talking to eachother and perhaps Windows doesn't understand TERM at all.
nothing curses style works properly.

I  tried different TERM settings: vt100, and ansi

no benefit.

thanks for trying. other ideas welcome.



Kind regards
Ingolf

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users