News for hackers. Stuff that matters.
Re:PuTTY 0.73 by jchw on Tuesday October 01, 2019 @11:58AM (#21126871)
PuTTY is fine of course, but just FYI to those who don’t realize it: Microsoft has worked for a while to port OpenSSH to Windows proper. I think they are even shipping it with Windows nowadays.

https://github.com/PowerShell/openssh-portable

Re:PuTTY 0.73 by signal11 on Tuesday October 01, 2019 @12:45PM (#21127552)
Yes, %Windir%\System32\OpenSSH has all the OpenSSH binaries. It also ships with curl and tar. No gzip, although tar understands the z option.

PS. Most shockingly of all, Windows's Notepad reads and writes Unix-style LF-terminated files.

Re:PuTTY 0.73 by jchw on Tuesday October 01, 2019 @12:53PM (#21127639)
I first hit the lack of LF line endings support at around age 11 on Windows 98. It’s genuinely pretty weird to realize it’s finally fixed
Re:PuTTY 0.73 by tomatocracy on Tuesday October 01, 2019 @01:02PM (#21127749)
Interesting. Wordpad could always handle LF-only well enough and came with Windows 95 and onwards so you could always use that. Not sure why that wasn’t more widely known. (Though on newly added lines it did add CR+LF rather than staying consistent to the source file).
Re:PuTTY 0.73 by jchw on Tuesday October 01, 2019 @01:12PM (#21127886)
The trouble with Wordpad was that it was not a good editor for plaintext. It was clearly designed for rich text. I preferred third party editors very greatly.
Re:PuTTY 0.73 by Paperweight on Tuesday October 01, 2019 @01:37PM (#21128204)
Kind of like TextEdit is on macOS is today (the one bundled with the OS).

It's slightly annoying that you have to twiddle a bunch of the preferences to make it a workable plaintext editor. Apple should just delete its rich text functionality, now that they bundle a real word processor (Pages) with the OS.

Re:PuTTY 0.73 by valleyer on Wednesday October 02, 2019 @01:19AM (#21133610)
IMO, you have to twiddle exactly one preference, exactly once, to make TextEdit a workable plaintext editor.

In TextEdit -> Preferences..., select the "Plain text" radio button. New documents are created as plain text now.

Re:PuTTY 0.73 by Paperweight on Wednesday October 02, 2019 @01:42AM (#21133677)
Kind of, but to be safe you have to change 12 preferences from the defaults, IMO.

  New Document:
    Format: 
      Plain Text (select)
    Options:
      Check spelling as you type (disable)
      Correct spelling automatically (disable)
      Smart copy/paste (disable)
      Smart quotes (disable)
      Smart dashes (disable)
      Text replacement (disable)
  Open and Save:
    When Opening a File:
      Display HTML files as HTML code instead of formatted text (enable)
      Display RTF files as RTF code instead of formatted text (enable)
    When Saving a File:
      Add ".txt" extension to plain text files (disable)
    Plain Text File Encoding:
      Opening files = Unicode (UTF-8)
      Saving files = Unicode (UTF-8)
Re:PuTTY 0.73 by WhiteOwlLion on Wednesday October 02, 2019 @08:37PM (#21142395)
I got sick of textedit and installed open source atom
Re:PuTTY 0.73 by aeyes on Tuesday October 01, 2019 @01:22PM (#21127990)
Also, back in the day opening a 5MB logfile in Wordpad was a recipe for stalling your system.
Re:PuTTY 0.73 by ygra on Wednesday October 02, 2019 @12:49AM (#21133519)
Back in the day Notepad had a 32K file size limit as well. No stalling, but also no viewing your log file that way.
Re:PuTTY 0.73 by cpach on Tuesday October 01, 2019 @01:24PM (#21128026)
IIRC Wordpad could handle LF but not UTF-8 and Notepad could handle UTF-8 but not LF (^_^)
Re:PuTTY 0.73 by signal11 on Wednesday October 02, 2019 @06:54AM (#21135052)
I was aware, but 3rd party editors like Notepad2 or Notepad++ were much better than Wordpad for lightweight program editing as they also had syntax highlighting, auto-indent, etc.
Re:PuTTY 0.73 by aashcan on Tuesday October 01, 2019 @01:07PM (#21127809)
Re:PuTTY 0.73 by cpach on Tuesday October 01, 2019 @01:34PM (#21128159)
Now if they only could get rid of the Byte Order Mark in CSV files created in Excel or Powershell...
Re:PuTTY 0.73 by nodesocket on Tuesday October 01, 2019 @08:09PM (#21132243)
Also, can't you install and enable Windows Subsystem for Linux (beta) and then you get ssh?
Re:PuTTY 0.73 by SitiSchu on Wednesday October 02, 2019 @10:17AM (#21136699)
You can and you get the advantage of having a proper package manager too. Or incase you're (still) on Windows 7 or can't enable WSL you can install mysys2 which comes with SSH(and bash) aswell.
Re:PuTTY 0.73 by cpach on Tuesday October 01, 2019 @01:25PM (#21128037)
Are those applications installed by default these days?
Re:PuTTY 0.73 by sequence7 on Tuesday October 01, 2019 @02:51PM (#21129173)
Not enabled by default but you can easily switch it on from powershell.

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Re:PuTTY 0.73 by smitty1e on Tuesday October 01, 2019 @12:25PM (#21127285)
Mobatek's MobaXterm is a truly superior product:

https://mobaxterm.mobatek.net/

SSH, remote desktops, hugs & cupcakes for all my friends!

Re:PuTTY 0.73 by xorcist on Tuesday October 01, 2019 @01:32PM (#21128141)
MobaXterm is not free/open source software. This may or may not be relevant to you of course.
Re:PuTTY 0.73 by smitty1e on Wednesday October 02, 2019 @08:14PM (#21142230)
What do you mean? They offer a paid version with some minor bennies.

The product is of sufficient value that it's worth supporting.

Re:PuTTY 0.73 by AhtiK on Tuesday October 01, 2019 @12:49PM (#21127592)
From: https://mobaxterm.mobatek.net/

> Tabbed terminal with SSH > Based on PuTTY with antialiased fonts and macro support

MobaXterm and PuTTY cover very different use-cases, PuTTY being a subset with close to 100% feature parity.

Re:PuTTY 0.73 by qzw on Tuesday October 01, 2019 @12:51PM (#21127616)
It’s a great Swiss-army-knife of a terminal. One annoying thing that I’ve lived with for years is that it won’t start on my second monitor. I always have to move its window after starting it. I tried to file a bug years ago, but couldn’t find a way to do it on their website. Maybe it’s time to look again.
Re:PuTTY 0.73 by nailer on Tuesday October 01, 2019 @05:34PM (#21130952)
You're comparing an SSH implementation with a terminal (that seems to also include an SSH implementation).

For Terminals, Windows has a number of outstanding terminal apps:

- Windows Terminal (a tabbed terminal made by Microsoft)

- Fluent

- Hyper 3

- Terminus

- ConEmu

And a billion other maintained tabbed terminals, some with an SSH UI if you want it. As an SSH implementation though, openssh is probably the best.

Re:PuTTY 0.73 by hrez on Tuesday October 01, 2019 @09:50PM (#21132789)
That's right, putty is usable terminal first. I can get ssh in various ways on windows. Decent linux terminal is hard to find though. Nothing comes close to putty and clones. The worst part in various contenders is output speed. Many of them are ridiculously slow. I don't care how pretty that Electron-based terminal is if it's dog slow.
Re:PuTTY 0.73 by nailer on Wednesday October 02, 2019 @03:12AM (#21134030)
I don't know what "Decent linux terminal is hard to find though" means.

Linux has great terminals. Gnome Terminal and KTerm.

If by 'Linux terminal' you just mean terminal, Windows Terminal and Fluent aren't Electron based and are both quite fast.

Re:PuTTY 0.73 by hrez on Wednesday October 02, 2019 @02:33PM (#21139416)
I meant a terminal on windows to ssh to linux. Simple test - cat 50k lines of some logs. See how long it takes on various terminals. Under remote screen/tmux see if you can switch windows while it keeps flooding the screen. There is no reason for terminal to be slower than ssh. I tried windows terminal and it's slow.

Of course there are also fonts, copy/paste, colors, keys customization etc. But slowness is a deal breaker for me.

Re:PuTTY 0.73 by nailer on Wednesday October 02, 2019 @04:33PM (#21140472)
Ah I normally think of performance as in interactive latency.

You probably want alacritty then, it's GPU accelerated and designed to be ultra fast. No tabs, it's expected you add a Windows based tabbing window manager.

Re:PuTTY 0.73 by hrez on Wednesday October 02, 2019 @04:57PM (#21140668)
alacritty is ok-ish. Probably better than most alternatives. Putty is still faster. And putty switches between tmux windows immediately while streaming the output. While alacritty has a visible delay (some times seconds) for that. Sure if you're using local tabs instead of remote tmux it may not matter that much.
Re:PuTTY 0.73 by nailer on Wednesday October 02, 2019 @06:06PM (#21141268)
Are you sure? I thought Alacritty's whole claim to fame was hat they're faster than everyone for steaming huge amounts of text.

Ack re: switching between tmux tabs though.

Have you tried Windows Terminal or Fluent? WT is C++ so should be good (and has a huge team of developers on GitHub who are paid to make it not suck - if you have a bunchmark to show it's slower than putty on a task, they'll probably want to fix it.

Re:PuTTY 0.73 by hrez on Thursday October 03, 2019 @03:37AM (#21144603)
Here is how to reproduce it. Ssh to a system with tmux. Attach to tmux and "head -100000 maillog" or whatever big. Measure how long till it's finished. Try to switch to another tmux window and back while it's going.

Repeat the above in another terminal and compare.

Windows Terminal is actually pretty bad under tmux but ok-ish without. Can't switch off to another tmux window while it's going either so basically locked in. That's unusable.

The argument could be made that tmux is an issue. But since 100% of my ssh is under remote tmux and it's fast in putty/kitty I can only blame other terminals. Even without tmux kitty is 2x faster than windows terminal. And kitty doesn't slow down under tmux.

Re:PuTTY 0.73 by nailer on Thursday October 03, 2019 @08:51AM (#21146360)
Ah fair enough. I don't use tmux so I've never noticed it - that said it's pretty common - you should copy the above to the Windows Terminal GitHub.
Re:PuTTY 0.73 by yread on Tuesday October 01, 2019 @02:15PM (#21128759)
I used to like it a lot but I've found it consistently uses about 4% CPU no matter if I have any sessions open
Re:PuTTY 0.73 by geocrasher on Tuesday October 01, 2019 @02:43PM (#21129087)
Do you have the Xserver turned on by default? If so, turn it off.
Re:PuTTY 0.73 by swtrs on Tuesday October 01, 2019 @12:29PM (#21127335)
MobaXterm's colored terminals have saved my bacon more than once. Great app.
Re:PuTTY 0.73 by geocrasher on Tuesday October 01, 2019 @12:53PM (#21127649)
And, it imports PuTTY sessions seamlessly. A wonderful upgrade.

Another consideration is that the free version is licensed for commercial use, which is why I freely recommend it at work and with a clear conscience.

Re:PuTTY 0.73 by richardlblair on Tuesday October 01, 2019 @12:43PM (#21127526)
WSL is the answer to anything where you go "I want ____ from <linux distro>". Install a decent terminal emulator, open it, type "bash" and win.
Re:PuTTY 0.73 by tlynchpin on Tuesday October 01, 2019 @02:26PM (#21128903)
"Install a decent terminal emulator" - this is the big problem for any command line experience on windows. What do you suggest?
Re:PuTTY 0.73 by sixothree on Tuesday October 01, 2019 @03:23PM (#21129501)
What are you missing? Windows Console has undergone a complete overhaul in the last few years. With QuickEdit, copy and paste via keyboard, and reflow during window resizing, the Windows Console is pretty nice.

Also this might be helpful for anyone wanting to follow along: https://devblogs.microsoft.com/commandline/

Re:PuTTY 0.73 by DuskStar on Tuesday October 01, 2019 @05:35PM (#21130956)
Has anyone tried the new official terminal? [0]/[1]

It looks rather interesting, if still in prerelease. (also, there's a trailer for it on YouTube - so weird [2])

0: https://github.com/microsoft/terminal

1: https://www.microsoft.com/en-us/p/windows-terminal-preview/9...

2: https://www.youtube.com/watch?v=8gw0rXPMMPE

Re:PuTTY 0.73 by nailer on Tuesday October 01, 2019 @05:38PM (#21130983)
I use Windows Terminal about 10 hours a day. Windows Terminal has got tabs, Unix cut and Paste, emoji support (surprisingly how common outputting emoji is in tests suites etc).

The 0.5 version is usable as a day to day terminal.

Alternative most stable Terminal is Fluent which I've used for a couple of years now.

I have small reviews of about 8 of the Windows terminal apps at: https://github.com/mikemaccana/powershell-profile

Re:PuTTY 0.73 by richardlblair on Wednesday October 02, 2019 @11:51AM (#21137788)
Hyper works pretty damn well. I was using ConEMU, but it is very slow on WSL2.

Fwiw, I work on rails + react apps with this setup: - Hyper as my terminal - WSL2. Then just my zsh/vim/tmux setup - Docker's tech preview for WSL2

This has been pretty reliable so far. I'm sure I'll hit a snag at some point, but it has been a relatively smooth experience.

Re:PuTTY 0.73 by y4mi on Tuesday October 01, 2019 @02:41PM (#21129066)
I'm currently using wsltty, which is mintty for wsl. It's decent, but it's terrible on fast scrolling texts (i.e. `docker logs` for a container without a maximum log size configured)

Alacritty is great if you need actual performance.

Hyper is actually the one with the overall best experience, but it is electron and the usual issues apply.

Fwiw, mobaxterm can also be configured to use wsl.

Re:PuTTY 0.73 by pedrocx486 on Tuesday October 01, 2019 @03:00PM (#21129278)
Is Cmder/ConEmu good? I use it and kinda expected it to be listed.
Re:PuTTY 0.73 by y4mi on Tuesday October 01, 2019 @03:34PM (#21129630)
My list wasn't supposed to be exhaustive in any way. I'm sorry if it sounded like that.

There are quite a few terminal emulators on windows and I just listed a few I thought noteable.

I didn't even mention the new one from Microsoft!

If you just want a sleek looking terminal for a few commands, cmder is definitely a valid choice. The occasionally broken copy paste is however dangerous, as it can remove characters from the middle of a line

I.e. `rm -rf /tmp/something && echo success` can get shortened to `rm -rf / && echo success`. It's admittedly very unlikely, as it usually just introduces errors such as `rm -rf /tm & echo success`.

Re:PuTTY 0.73 by pedrocx486 on Wednesday October 02, 2019 @11:10AM (#21137277)
The new one from Microsoft is getting there, is just needs an "Terminal here" on right click ;)

Also yes I noticed those issues in Cmder, I'm always looking for better choices that look nice to the eyes.

Re:PuTTY 0.73 by mikewhy on Tuesday October 01, 2019 @03:18PM (#21129446)
ConEmu works but honestly every time I look into Windows terminals I keep looking for another option, there's just so many issues with ConEmu.
Re:PuTTY 0.73 by pedrocx486 on Wednesday October 02, 2019 @11:08AM (#21137267)
Any good ones? I use Cmder (ConEmu based) a lot, but I do notice the issues from time to time.
Re:PuTTY 0.73 by jchw on Tuesday October 01, 2019 @04:32PM (#21130271)
Last I checked, SSH agent does not work under WSL. Even if that is fixed, though, the OpenSSH port will integrate much cleaner with Windows software; I set it up for use with Git and my IDE.
Re:PuTTY 0.73 by imafish on Tuesday October 01, 2019 @01:42PM (#21128282)
Unless you are stuck on an old version of Windows (or Win Server). I am using the Win port of OpenSSH for exactly this reason.
Re:PuTTY 0.73 by kbenson on Tuesday October 01, 2019 @12:05PM (#21126988)
I ran into some problems with the agent last time I tried to use it, unfortunately. I would love to be able to use OpenSSH with the new Windows Terminal (well, eventually, the Windows Terminal has some annoying edge cases too, but is very promising, which is acceptable for something in a preview/beta state).
Re:PuTTY 0.73 by m-p-3 on Tuesday October 01, 2019 @01:51PM (#21128434)
I guess I like having the prelogin GUI of PuTTY.
Re:PuTTY 0.73 by grenoire on Tuesday October 01, 2019 @01:53PM (#21128459)
Saving credentials and much more with the GUI. Not to discount the value of all the cool utilities it comes with.
Re:PuTTY 0.73 by jchw on Tuesday October 01, 2019 @01:56PM (#21128509)
Just to be clear: there are advantages to OpenSSH too. The Windows port has an agent that runs as a service, you can configure using the standard .ssh/config mechanism that works with lots of FOSS software, and etc.
Re:PuTTY 0.73 by pfranz on Tuesday October 01, 2019 @02:15PM (#21128762)
Holy jeez are there benefits to OpenSSH over PuTTY. I have to walk end users through setting up PuTTY. Since configuration uses the registry and there are no import/export configs I have to walk them through the UI, which is a mess (especially when they miss a step). For macOS users I just give them a command line to copy/paste. We've considered requiring WSL (a few gig install) just to get ssh in Windows because those users have had better experiences. Thankfully, it's now built in.
Re:PuTTY 0.73 by oso2k on Tuesday October 01, 2019 @12:42PM (#21127519)
I tend to prefer to use git-bash or msys/mingw when I have to work on a Windows machine. Never became a fan of Powershell.
Re:PuTTY 0.73 by shawnz on Tuesday October 01, 2019 @12:47PM (#21127578)
Despite the repository owner there's no dependency on Powershell. You get a normal ssh.exe binary.
Re:PuTTY 0.73 by sequence7 on Tuesday October 01, 2019 @02:48PM (#21129144)
Yep, you can just run the following command in PowerShell to enable ssh.

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

You can check if ssh is enabled with this command.

Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

Re:PuTTY 0.73 by zamadatix on Tuesday October 01, 2019 @12:10PM (#21127065)
What's the best replacement for serial port connectivity on Windows? That PuTTY has it's own terminal settings always bothered me but I'm not sure what all is popular.
Re:PuTTY 0.73 by tssva on Tuesday October 01, 2019 @01:19PM (#21127949)
You can use the PuTTY cli command plink. For example:

  plink -serial COM1 -sercfg 9600,8,N,1,N
This will connect to serial port COM1 at 9600 baud, 8 databits, no parity bits, 1 stop bit and no flow control.
Re:PuTTY 0.73 by zamadatix on Tuesday October 01, 2019 @01:43PM (#21128305)
This is pretty nifty, thanks.
Re:PuTTY 0.73 by elsjaako on Tuesday October 01, 2019 @12:24PM (#21127268)
I usually recommend Termite to people

https://www.compuphase.com/software_termite.htm

Re:PuTTY 0.73 by SteveMoody73 on Tuesday October 01, 2019 @02:03PM (#21128625)
Tera term is what i tend to use. https://ttssh2.osdn.jp/
Re:PuTTY 0.73 by rhexs on Tuesday October 01, 2019 @12:17PM (#21127178)
As a guy who uses serial enough to wonder the same thing, my solution was buying a cheap Linux machine. Serial is thousands of times simpler and more convenient to use on Linux.

Probably not too helpful if you’re dealing with poorly written windows serial software targeting embedded though.

Re:PuTTY 0.73 by bleomycin on Tuesday October 01, 2019 @12:45PM (#21127556)
What software are you using on linux to interface with serial? I always used screen but it seems there’s probably a better way?
Re:PuTTY 0.73 by rhexs on Tuesday October 01, 2019 @01:12PM (#21127884)
Screen. Most of the time saved is not having to try to install whatever bizarre serial driver windows needs.

Also python if you need to programmatically connect and operate a device over serial. Quite easy.

Re:PuTTY 0.73 by ahartmetz on Tuesday October 01, 2019 @02:08PM (#21128678)
Yep, screen is the easiest. Minicom often gets confused, or at least confuses me with its weird UI. With screen I just run "screen /dev/ttyUSB0 115200".
Re:PuTTY 0.73 by ch_123 on Tuesday October 01, 2019 @12:27PM (#21127311)
If you have WSL installed, I believe it's possible to use the standard Linux serial utilities with a USB-RS232 dongle.

If WSL was not an option, I personally would still use PuTTY

Re:PuTTY 0.73 by xorcist on Tuesday October 01, 2019 @01:55PM (#21128495)
Not sure which serial utilities are standard though. I know many use Kermit, but I never found it very unixish.

I personally use 'screen'. It's a perfectly capable terminal for serial communications. It can even catch zmodem handshakes (it's in the manual).

Re:PuTTY 0.73 by jchw on Tuesday October 01, 2019 @07:29PM (#21132017)
I also use screen for this, though I find myself accidentally leaving sessions in the background and wondering why I’m missing characters in the output.

That said, does WSL really provide serial devices? That’s pretty awesome. I wonder if USB also is a thing in the WSL2 world.

Re:PuTTY 0.73 by runjake on Tuesday October 01, 2019 @01:58PM (#21128531)
Yes. This works even in WSL 1. I use GNU Screen in WSL on the regular to console into network switches.
Re:PuTTY 0.73 by Scarbutt on Tuesday October 01, 2019 @12:43PM (#21127523)
yes, but the putty terminal is still better than cmd prompt.
Re:PuTTY 0.73 by cwyers on Tuesday October 01, 2019 @01:12PM (#21127881)
The new Windows Terminal app is a massive improvement on the Windows Console, even while it's in beta.

https://devblogs.microsoft.com/commandline/introducing-windo...

I've found that between OpenSSH for Windows, Windows Terminal and WSL, I don't need PuTTY anymore. It's also nice to be able to use the same SSH keys on Windows and Linux instead of converting PuTTY keys to OpenSSH keys and vice versa.

Re:PuTTY 0.73 by WorldMaker on Tuesday October 01, 2019 @01:16PM (#21127929)
Give the modern Windows Terminal preview a shot if you get a chance. (You'll need a recent Windows 10 1903, at least. It's in the Microsoft Store or you can install from GitHub.) The Windows Console team has been putting in a lot of work at making everything terminal better for everyone on Windows. (The Windows Terminal is powered by a new Linux-like PTY system that other terminals can use instead of screen-scraping ConHost like they used to. Which also means fewer "translation" layers between the old Console system and WSL PTYs.)
Re:PuTTY 0.73 by sebazzz on Tuesday October 01, 2019 @12:46PM (#21127568)
For me it is a keychain / bookmark system. Though I suppose I could use Keepass for that as well.
Re:PuTTY 0.73 by majkinetor on Tuesday October 01, 2019 @04:57PM (#21130542)
and kitty is better then putty.
Re:PuTTY 0.73 by royjacobs on Tuesday October 01, 2019 @01:31PM (#21128118)
Is there a guide somewhere on how to set this up as a Pageant replacement for git purposes?
Re:PuTTY 0.73 by mc32 on Tuesday October 01, 2019 @12:59PM (#21127718)
The one nice thing about putty is the option to write output to logs.