15

Is there an SSH2 implementation that will run in the Win32 console (i.e. cmd.exe)?

As far as I know (correct me if I'm wrong) I know of the following SSH implementations:

  • PuTTY - Doesn't run in the Win32 console
  • TeraTerm SSH - Doesn't run in the Win32 console
  • SecureCRT - Exorbitant pricing, doesn't run in the Win32 console
  • SSH via Cygwin - Enormous dependency
3
  • 2
    Cygwin's SSH does run in the Win32 console. Commented Apr 5, 2014 at 11:40
  • 1
    You can also try plink which comes with putty. The console support is... very limited (speak: non-existant) - it won't support any ansi-escape sequences, but if you don't need them, it might be enough. Commented Apr 6, 2014 at 12:39
  • 1
    SSH comes as a dependency to Git for windows. It comes with a hole suit of POSIX style tools that run under windows nativly via MinGW. MinGW is arguably a lighter and a more 'Native' choice over Cygwin. Also the Git installer is only ~20MB and easy to install.
    – Zv_oDD
    Commented Nov 8, 2014 at 1:35

5 Answers 5

9

You can use OpenSSH for Windows:

  • free
  • works withing cmd
  • supports SSH2
  • also provides SSH server functionality

enter image description here

8
  • 6
    How could you possibly be recommending security-related software like ssh that hasn't been updated since mid 2004, just a couple of months short of 10 years?
    – cnst
    Commented Apr 5, 2014 at 16:02
  • 2
    The OP just wants the client. What kind of security issues are you fearing with a client? Commented Apr 5, 2014 at 16:10
  • 3
    Why would security be of any less concern if it's the client? Older PuTTY versions do suffer from several security issues, for example.
    – cnst
    Commented Apr 5, 2014 at 16:18
  • 2
    @cnst Most attacks concern servers, SSH clients are pretty safe (a bit less if you connect to some rogue servers): chiark.greenend.org.uk/~sgtatham/putty/changes.html Commented Apr 5, 2014 at 16:29
  • 2
    I don't know: most of the time I connect to non-malicious servers. Commented Apr 5, 2014 at 16:45
5

Not Sure if this is off topic but... There is a windows cmd wrapper called ConEmu that supports tabs and allows you to putty windows into those tabs:

Starting a putty instance with the -new_console argument hook Starting a putty instance with the -new_console argument hook

Putty GUI comes up, can be avoided with proper arguments passed on the first step. Putty GUI comes up, can be avoided with proper arguments passed on the first step. Putty console is new a tab in the ConEmu Window (note the screen splitting is caused by ":s" in "-new_console:s Putty console is new a tab in the ConEmu Window (note the screen splitting is caused by ":s" in "-new_console:s

4

The plink version of PuTTY is a console application that can be run from cmd.

2
  • Welcome to SR. Link only answers are not acceptable quality; please update to include why you are recommending this/comment on stability/some more details. Commented Apr 5, 2014 at 5:47
  • I think this is an appropriate answer. plink is a good solution to this problem, but it looks like it was meant to process scrips, not provide a user interface to SSH. I cant figure out how to make any visual controls work in it (e.g. irssi) Commented Apr 6, 2014 at 3:21
4

There is a ssh executable present in each git installation. The location may change by version, but it should be present. Note that the ssh executable will not be in your PATH by default after installing git, so it won't work from commandline just like that.

Instead of adding the folder to my PATH (that would add many executables, which I want to avoid), I use a script ssh.bat which is located in a folder on my PATH.

REM Note: this was the path for Git 2.6.2
REM the @ prevents the command being shown twice in the cmd window
REM %* forwards all parameters
@"c:\Program Files\Git\usr\bin\ssh.exe" %*
2
  • I like this answer but Git is simply using MSYS here. And, if you are careful (e.g. using Dependency Walker), you can extract what you need directly from MSYS without having to install Git or MSYS. Commented Jul 10, 2016 at 14:34
  • You can also just use a bat script to add "C:\Program Files\Git\usr\bin" to the Path var, then ssh.exe will be called directly with ssh. set PATH=C:\Program Files\Git\usr\bin;%PATH%
    – Zv_oDD
    Commented Nov 22, 2016 at 4:18
4

I needed this for a cross-platform project. And since none of the other answers precisely solved the problem for me, I went ahead and built it:

32-bit ssh.exe: https://github.com/cubiclesoft/ssh-win32

64-bit ssh.exe: https://github.com/cubiclesoft/ssh-win64

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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