Maximus5 / conemu-old-issues

Old issues imported from googlecode. Project was moved to
https://conemu.github.io
6 stars 1 forks source link

Problem with PuTTY and KiTTY #1862

Open Maximus5 opened 9 years ago

Maximus5 commented 9 years ago

Originally reported on Google Code with ID 1863

**Required information**
OS version: Win8.1 x64
ConEmu version: 141221 (both x86 and x64)
Far version: none

**Description**
I tried to attach a putty session through a new task, following the steps in this post:
http://www.thecrumb.com/2013/03/04/configuring-conemu-and-putty/

The task just opens an empty tab. A putty.exe/kitty.exe also appears in Windows task
manager.
Depending on the parameters, this happens:
1. If I use -load option, a little black command-prompt-like window briefly appears,
then disappears and the tab closes itself. It seems empty but can't assure it since
it's alive a fraction of a second.
2. If I don't use -load, the PuTTY tabs appear in ConEmu and it's empty. If I select
any of my other tabs and the select back the PuTTY tab, it shows this message:
-----------------------------------------------------------
| GUI application (PID=xxxxx) was attached to ConEmu:
| C:\path\to\kitty.exe
-----------------------------------------------------------
where xxxxx are typical random PID numbers.
After some seconds, PuTTY tab closes itself.

**What I have tried (to no avail, obviously)**
Sessions are working fine opening them through putty/kitty itself.
Different versions of ConEmu, in x86 and x64 flavors.
Different versions of PuTTY.
Also tried KiTTY with exactly same troubles.
Run everything as administrator.
Completely disable Antivirus.

I think it's worth to mention that I actually had two different putty sessions in two
different ConEmu tasks (one pointing to a web hosting and another one pointing to my
own VirtualBox machine), and both worked fine. And then all of a sudden, they stopped
working. Can't remember if I did something that actually could affect ConEmu or PuTTY
but I'd say I didn't. Maybe a Windows update could screw all up? Do you know of any
known issues with Windows updates?

**Steps to reproduction**
1. Open ConEmu
2. Create task for putty/kitty
3. Try to open such task
4. The above-mentioned problems appears (see description above)

I'll attach my ConEmu.xml settings file. It's the file created after clicking "Reset..."
button inside ConEmu settings. I mean, it's pretty much the "default" settings, so
I don't know if it will be useful.

BTW, does anyone know a workaround? I have Powershell and when I type 'ssh', it seems
that it has installed some kind of ssh client. Does anyone know if there is some way
to 'automatize' it in ConEmu to open a specific user@server:port and such?

Reported by migmolrod on 2015-01-12 01:38:03


Maximus5 commented 9 years ago
Attach LogFiles when you are trying to run these tasks.

PuTTY and KiTTY are ChildGui. If they were not attached or started properly that means
they were failed to do something. Run ProcessMonitor and compare logs when you run
them in ConEmu and from simple Win+R.

Last note. Plink is native console app with PuTTY functionality.

Reported by ConEmu.Maximus5 on 2015-01-12 01:46:24

Maximus5 commented 9 years ago
Ok, here we go.
1. I opened ConEmu at around 3:02:00 (hh:mm:ss). The default {cmd} task got open.
2. I waited until 3:05:00 approximately to open the {KiTTY} task.
3. It did its stuff and closed at about 3:05:13.
4. I waited to close ConEmu until 3:05:22.

Hope it helps you to dive into the logs.

And thanks for your reply, of course :)
I'll give Plink a try as a workaround until I find a better (if possible) solution.
Or did you mean I can attach Plink into ConEmu as well?

Reported by migmolrod on 2015-01-12 02:20:00


Maximus5 commented 9 years ago
You don't need to ATTACH any console app to ConEmu! Just run them.

In fact running ChildGui is supplementary option because of their own drawing system.

Screenshots may help to understand your problem too.

Reported by ConEmu.Maximus5 on 2015-01-12 02:26:34

Maximus5 commented 9 years ago
Ok, right now I have a working plink task. I'll play with it a little bit more to understand
all its options and see if I can somehow store sessions as files that can be easily
loaded.

And about screenshots, I don't think they would be that useful in this particular case.
I'd find more useful a screencast (video). I can try to do one. Give me a moment.

Reported by migmolrod on 2015-01-12 02:32:23

Maximus5 commented 9 years ago
Here is the video
https://www.youtube.com/watch?v=2haPtwmJCtI&feature=youtu.be
In theory, the video is private and only your gmail account should be able to see it.

Reported by migmolrod on 2015-01-12 03:39:21

Maximus5 commented 9 years ago
Your KiTTY instance was crashed unexpectedly.
Do not know why. At least your have Bitdefender and Stardock hookers. They may (or
may not) cause that.

Reported by ConEmu.Maximus5 on 2015-01-13 09:22:23

Maximus5 commented 9 years ago
I've tried completely disabling BitDefender with same error. Not sure about Stardock.
Anyway, I have a well working Plink task so I won't care anymore about this. Maybe
if I format and reinstall Windows, I can give KiTTY another try to see if it was something
with the software I'm using now.

Since it seems clearly a problem in my end, you can close this if you want.

Thanks, 'Max'

Reported by migmolrod on 2015-01-14 13:43:21

Maximus5 commented 9 years ago
I have found the same issue and found strange solution. I have putty extracted from
zip and added to my PATH variable. Conemu.dll ejecting and keyboard hooks disabled.

When I run putty in that way, putty don't attach to tab:

start /b %DEV_SOFT%/ConEmuPack.150420/ConEmu64.exe /single /cmd "putty.exe -ssh -i
%demo_ppk% root@%server_1%"

But when i set full path to putty.exe it attach successfully. Very strange problem

start /b %DEV_SOFT%/ConEmuPack.150420/ConEmu64.exe /single /cmd "C:/workspace/dev_soft/putty/putty.exe
-ssh -i %demo_ppk% root@%server_1%"

Thanks for your work maximus. Conemu is awesome

Reported by largeadvbox on 2015-04-28 09:30:35

Maximus5 commented 9 years ago
@largeadvbox
You have to remove quotations around "putty.exe .. "

... /single /cmd putty.exe -ssh -i %demo_ppk% root@%server_1%

Reported by ConEmu.Maximus5 on 2015-04-28 09:46:57

Maximus5 commented 9 years ago
It works, maximus, thanks.
But i think it should work with quotes too. Some trim function needed there. Because
its first idea of cmd user when he see arguments with spaces.

Espetially because putty starts but not attached. It looks like your program bug, Not
like own fuckup for user.

Reported by largeadvbox on 2015-04-28 15:13:45

Maximus5 commented 9 years ago
Be careful user may use quotes inside his command like

cd "C:/Program Files"

"cd "C:/Program Files""

Thanks for help

Reported by largeadvbox on 2015-04-28 15:20:06