PuTTY in console window

9,778

Solution 1

I tried the tool proposed by Martin Prikryl in his answer, but unfortunately I had some problem with it.

Luckily, I found this [1] other build of OpenSSH which worked fine. It's apparently exactly the same thing (a build of OpenSSH for Windows).

[1] http://www.mls-software.com/opensshd.html

Solution 2

There's Microsoft build of OpenSSH for Windows.

It includes OpenSSH ssh.exe, that's a console application with a full terminal support.

On Windows 10 version 1803 or newer, you already have OpenSSH built-in. On older versions of Windows 10, it can be installed as an optional Windows feature. On older versions of Windows, you can just extract the client-side tools from a .zip (latest release), no installation is need.


PuTTY is a GUI application. It's not possible for a GUI application to use a console in Windows.

Plink deliberately lacks some terminal features, as it is intended for automation, not for an interactive use. See PuTTY wish plink-terminal.

Share:
9,778

Related videos on Youtube

lodo
Author by

lodo

Computer Science student at University of Trento (Italy).

Updated on September 18, 2022

Comments

  • lodo
    lodo over 1 year

    I'd like to use PuTTY the same way I would use ssh on Linux, i.e. from the command line, without spawning a new window. The reason for doing so is that I want to use it from the integrated terminal of an IDE. So I don't want external windows popping out.

    I know I can do this with Plink, which is shipped with PuTTY, but Plink has a few problems:

    1. if you use cmd.exe, it gets jammed by color control sequences (this is not a big problem, because PowerShell handles colors fine)
    2. special keys, like arrows, are not sent to the server, so no history and no moving left/right in the line being written.

    So, is there a way to solve problem 2. in Plink? Or is there a way to have Linux-like command-line ssh without these problems (with PuTTY or with something else)?

    • simlev
      simlev about 7 years
      Why don't you try Cygwin? I started using it instead of Putty for this exact reason.
  • lodo
    lodo about 7 years
    Unfortunately, that build does not work on my system, for some reason. Luckily, I found another build of OpenSSH that works fine. See my answer.
  • lodo
    lodo about 7 years
    When I try to connect, it says me that the fingerprint is not known, so it asks me to type "yes" or "no" to allow or block the connection (cause it doesn't trust it). But I cannot type in that terminal! For some reason it does not accept any input. The other package contains exactly the same command, with exactly the same option and the same behaviour, but I can type in it fine.
  • lodo
    lodo about 7 years
    In fact, that's really a strange bug. I don't know what could prevent me from typing there. Luckily the other build works. So it's probably a matter of version.
  • Martin Prikryl
    Martin Prikryl about 7 years
    I have posted a bug report: github.com/PowerShell/Win32-OpenSSH/issues/692 - You can subscribe it to give it higher visibility.
  • simlev
    simlev about 7 years
    MLS Software's opensshd is a Cygwin package, as is apparent by the presence of cygwin1.dll and the fact that they ship the cygwin source code.