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:
- if you use
cmd.exe, it gets jammed by color control sequences (this is not a big problem, because PowerShell handles colors fine) - 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)?
2 Answers
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.
4I 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