TobiasChe / conemu-maximus5

Automatically exported from code.google.com/p/conemu-maximus5
0 stars 0 forks source link

Problem with PuTTY and KiTTY #1863

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
**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?

Original issue reported on code.google.com by migmol...@gmail.com on 12 Jan 2015 at 1:38

Attachments:

GoogleCodeExporter 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.

Original comment by ConEmu.Maximus5 on 12 Jan 2015 at 1:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter 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?

Original comment by migmol...@gmail.com on 12 Jan 2015 at 2:20

Attachments:

GoogleCodeExporter 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.

Original comment by ConEmu.Maximus5 on 12 Jan 2015 at 2:26

GoogleCodeExporter 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.

Original comment by migmol...@gmail.com on 12 Jan 2015 at 2:32

GoogleCodeExporter 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.

Original comment by migmol...@gmail.com on 12 Jan 2015 at 3:39

GoogleCodeExporter 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.

Original comment by ConEmu.Maximus5 on 13 Jan 2015 at 9:22

GoogleCodeExporter 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'

Original comment by migmol...@gmail.com on 14 Jan 2015 at 1:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter 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

Original comment by largeadv...@gmail.com on 28 Apr 2015 at 9:30

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

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

Original comment by ConEmu.Maximus5 on 28 Apr 2015 at 9:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter 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.

Original comment by largeadv...@gmail.com on 28 Apr 2015 at 3:13

GoogleCodeExporter 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

Original comment by largeadv...@gmail.com on 28 Apr 2015 at 3:20