Email or username:

Password:

Forgot your password?
Darius Kazemi

For a few months now, when I ssh to one particular machine from Win10 via Putty or WinSCP, after entering valid credentials I get this error: "remote side unexpectedly closed network connection." For Putty, this happens on stable 0.74, the current dev snapshot, and even an older version, 0.60. WinSCP is the latest stable version.

When I ssh from the same machine, booted into linux, it works fine.

I found only unanswered support threads googling for the error message.

46 comments | Expand all CWs
DJ Sundog - from the toot-lab

@darius nothing in the sshd logs on the server when this happens?

(ssh errors are some of the worst in terms of actually providing any useful information imo)

s0: Soldering Sorceress

@darius @djsundog do they have a difference in supported stream ciphers maybe?

Darius Kazemi

@s0 turns out it was just Putty's implementation of SSH causing some weird issue. I probably could have dug into the mismatch but instead switched to a different ssh client that uses OpenSSH and am now happy

VOLTUR

@darius @s0 oh sorry didn't see that you had already found it!!

The Bean Identity

@darius One thing I often hear is that scp still starts a shell, and if that happens to print anything I think you'll get that error?

Also putty IIRC has its own ssh implementation that is... idiosyncratic, so I'd see if the server has any unusual sshd configuration

Darius Kazemi

@faho turns out putty's implementation was the issue. switching to something with openssh worked great.

Alex Garnett

@darius have you tried using git bash to provide regular cli ssh on windows? or mobaxterm? I wouldn't be surprised if the other windows clients all the use the same non-comformant implementation; I usually stick to git bash's ssh

Darius Kazemi

@axfelix that did it!! git bash with openssh instead of putty/tortoise worked fine.

Alex Garnett

@darius good good. and if you want a nicer terminal to use with it, I used conemu for years but finally switched to the new windows terminal configured to launch git bash recently and the experience is good! I can share configs if you want

Alex Garnett

@darius this is windows terminal, configured to open an admin powershell with ctrl+shift+2 when you need admin to install choco packages &c (requires gsudo, which you can install from choco; check the launch args in there) but otherwise defaulting to git bash: dropbox.com/s/gjojfxy1vjsxmfu/

this is conemu, defaulting to git bash: dropbox.com/s/1s266nqf4aotnew/

good posix environments on windows are kind of an obsession of mine so happy to field any Qs here

@darius this is windows terminal, configured to open an admin powershell with ctrl+shift+2 when you need admin to install choco packages &c (requires gsudo, which you can install from choco; check the launch args in there) but otherwise defaulting to git bash: dropbox.com/s/gjojfxy1vjsxmfu/

Darius Kazemi

@axfelix have you played the demo for Project Triangle Strategy on the Nintendo Switch? It is.... really truly a spiritual sequel to FF: Tactics?!!?

Alex Garnett

@darius the spritework is even closer to snes tactics ogre!! I haven't actually loved the playability of the stuff coming out of the octopath team so far (and their obsession with depth of field is... cute), but in general I think the people working on these revival projects from inside rightsholders understand what they're doing way better than they did a decade ago so I'm optimistic

Darius Kazemi

@axfelix so I thought octopath was.... meh. But the actual tactics in this demo are really good. Of course there's no job system or economy or anything, just a linear series of battles but so far, so good. I also *really* love that you have to debate all your party members to get them to vote on major branching story decisions

Alex Garnett

@darius yeah, that was a neat thing I'm glad they stole from divinity original sin. I also just finished yakuza 7 which has some real pacing/balance problems in the mid-game but was very, very affectionately written (almost like a japanese saints row 4), and I've been playing star wars squadrons with my craigslisted HOTAS the past couple days, it's a minor miracle that they managed to make AAA tie fighter and it feels good and is fun considering the current state of star wars media

Darius Kazemi

@axfelix I adored Yakuza 7. It's my idea Yakuza game: no beat em up battles. I'm actually about to start D:OS for the first time...

Alex Garnett replied to Darius

@darius oh you're in for a treat, the first one even more than the second is I think one of the only real modern successors to fallout 1 in how free-from and lackadaisical it is, and the terry pratchett tone is a++ throughout

Darius Kazemi replied to Alex

@axfelix oh haha I just looked and I have the second one?

Alex Garnett replied to Darius

@darius the second one got bigger but I like it slightly less, it's a little more prescriptive, some of the plot threads don't really carry as well throughout, and it's less transparently an attempt to re-do anachronox as a sort of CRPG take on chrono trigger. it's still absolutely worth it though if you love the first, which I imagine you will

Григорий Клюшников

Maybe there's a way to enable debug logging? Running putty/winscp from a command prompt would be a good start, it might be printing something of interest to stdout.

Darius Kazemi

@grishka I ran winscp with maximum debug verbosity and the only unusual thing it gave me was the exact error message reported in the popup window

Jon Leibowitz

@darius Any chance your connection works with OpenSSH run as a CLI? Useful powershell snippets to install as a client:

docs.microsoft.com/en-us/windo

Darius Kazemi

@jon turns out putty's implementation was the issue. switching to something with openssh worked great.

Amolith :blobcatpopr:
@darius have you tried with Windows' native SSH client?
Darius Kazemi

@amolith there's a windows native ssh cilent?!

Amolith :blobcatpopr:
@darius Yes lol. No idea if it's there by default but you should be able to install Windows Terminal from the app store and just ssh user@example.com as on Linux. If you're doing fancy stuff like using an SSH key on a GPG key on a YubiKey, it gets much more janky though
Darius Kazemi

@amolith wow windows terminal is nice. thanks for the rec.

Darius Kazemi

Turns out if I use something like Git Bash that uses OpenSSH instead of Putty/WinSCP's different implementation, I can connect just fine! I am currently looking into alternatives and learning about the state of ssh in windows in 2021 because frankly I haven't changed my workflow since ~2001

tim 🍓

@darius i use git bash for my windows linuxy stuff, i dunno how to get it to work otherwise

Darius Kazemi

@objelisks oh I mean I used putty for years specifically to not deal with linuxy stuff on windows. my solution was always: log in to a linux machine and do my work there.

Max

@darius Putty does seem to be “retired to a farm upstate”. It was a great tool for a long time, but hasn’t kept up to date, is no longer supported by its original author and newer alternatives are often recommended.

Windows 10 has the (real) OpenSSH client built-in and out of the box these days (and an OpenSSH server as an easy to install optional feature). I don’t know of GUI tools like WinSCP to take advantage of it though.

Matthew "Smiffy" Smith

@darius I'd not used Windows for about as long as you've been using PuTTY. Using Windows 10, and discovering the Linux subsystem where I can do stuff through bash is a game-changer!

If I needed to, I could go back to it as my main OS, now that this is possible.

YHANCI~1.TXT

@darius oh strange issue :/

I've been considering just using Win's SSH & OpenSSH very recently (because it's apparently less of an issue if you use ssh private keys + some apps like Github Desktop)... I tested using ConEmu's tasks to start preconfigured SSH sessions... but then I had some weird display bugs in nano after resizing a window, and decided to stick to Putty(/Kitty) for now. Mh.

Ben Zanin

@darius I know you've found your workflow solution already (and you have been incredibly patient communicating that to everyone!) so I'm not offering advice, but: is there any chance you'd be willing and able to share the version and configuration of the sshd on the listening side? I would really love to try to dig into the exact underlying issue(s) here, even if just for my own edification!

Darius Kazemi

@gnomon `sshd -v` gives me "OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017". I don't know if that's what you are looking for re: version, but it's the same as a different server that was accepting connections just fine. The /etc/ssh/sshd_config on both servers, working and not, is identical too. Is there another file I should be looking at?

Ben Zanin

@darius there could be: sshd's config language is, uh... I'm going to go with "surprisingly versatile" (values can be defined as the results of external commands run at value-read time? Conditionals? Pattern matching??) so the config file itself could be identical but its complete specification could depend on other files.

JauntyWunderKind

@darius i'd reclassify this as a work around. wtc putty.

Defund cops, fund social work

@darius windows actually has a built-in ssh client these days. I use it with windows terminal and it works pretty well.

docs.microsoft.com/en-us/windo

Mike Macgirvin
This came up a lot here when Covid hit - as the firewalls were all being re-jiggered for the shift to remote access.

Any VPN's/gateways involved?
Darius Kazemi

@mike I managed to figure it out thanks to some suggestions. turns out putty's implementation was the issue - I'm guessing I probably updated sshd on my server and then something became incompatible on the client. switching to something with openssh worked great.

Kat MCP(NT4) MCSE(Win2K)

@darius ciphers ?
ssh -vvvv to get more debug ?

Darius Kazemi

@kat Debug was incredibly unhelpful, but it turns out putty's implementation of ssh was the issue. switching to something that uses openssh worked great.

[DATA EXPUNGED]
[DATA EXPUNGED]
VOLTUR

@darius last time I had that happen it was a botched configuration after an update that changed the protocols and excluded one I needed. It was really weird and we only saw it in the logs, to know what to add to the config

Go Up