Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Using a local proxy with putty fails immediately
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
pk  
View profile  
 More options Jan 26, 6:45 am
Newsgroups: comp.security.ssh
From: pk <p...@pk.invalid>
Date: Thu, 26 Jan 2012 12:45:29 +0100
Local: Thurs, Jan 26 2012 6:45 am
Subject: Using a local proxy with putty fails immediately
As the subject says: I'm trying to use putty to replicate a connection that
I originally used under Linux and that used the ProxyCommand directive.
Following all the docs I could find, I'm doing:

in the main window: user@internalpc, port 22, protocol SSH

in the proxy config panel: local proxy, and local proxy command is

plink.exe -i privatekey.ppk user@externalpc -nc %host:%port

This is running under Windows 7. However, when I try to connect, I
immediately get an error "server unexpectedly closed network connection".
It looks putty isn't even trying to do anything.

What I've tried:

- using actual host and port values in place of %host and %port in the
  local proxy command: same thing
- running the local proxy command on the command line: works fine, that is,
  I see internalpc's SSH banner.

I'm not sure how to debug this. Any help appreciated.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacob Nevins  
View profile  
 More options Jan 27, 6:55 am
Newsgroups: comp.security.ssh
From: Jacob Nevins <jac...@chiark.greenend.org.uk>
Date: 27 Jan 2012 11:55:40 +0000 (GMT)
Local: Fri, Jan 27 2012 6:55 am
Subject: Re: Using a local proxy with putty fails immediately

pk <p...@pk.invalid> writes:
>Following all the docs I could find, I'm doing:

>in the main window: user@internalpc, port 22, protocol SSH

>in the proxy config panel: local proxy, and local proxy command is

>plink.exe -i privatekey.ppk user@externalpc -nc %host:%port

>This is running under Windows 7. However, when I try to connect, I
>immediately get an error "server unexpectedly closed network connection".

What version of PuTTY?

Have you tried specifying the full path to plink.exe and to your .ppk
file in the "Telnet command, or local proxy command" field?

I quickly tried this with PuTTY 0.62 on Windows XP with the full path
(but without the -i); it worked for me.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pk  
View profile  
 More options Jan 27, 7:28 am
Newsgroups: comp.security.ssh
From: pk <p...@pk.invalid>
Date: Fri, 27 Jan 2012 13:28:02 +0100
Local: Fri, Jan 27 2012 7:28 am
Subject: Re: Using a local proxy with putty fails immediately
On 27 Jan 2012 11:55:40 +0000 (GMT), Jacob Nevins

<jac...@chiark.greenend.org.uk> wrote:
> pk <p...@pk.invalid> writes:
> >Following all the docs I could find, I'm doing:

> >in the main window: user@internalpc, port 22, protocol SSH

> >in the proxy config panel: local proxy, and local proxy command is

> >plink.exe -i privatekey.ppk user@externalpc -nc %host:%port

> >This is running under Windows 7. However, when I try to connect, I
> >immediately get an error "server unexpectedly closed network connection".

> What version of PuTTY?

0.62, downloaded from the official page.

> Have you tried specifying the full path to plink.exe and to your .ppk
> file in the "Telnet command, or local proxy command" field?

> I quickly tried this with PuTTY 0.62 on Windows XP with the full path
> (but without the -i); it worked for me.

I hadn't, now I did, and it fails in the same way :-(

I tried both using single backslashes (eg c:\windows\system32\plink.exe,
same for ppk file) and double backslashes (eg
c:\\windows\\system32\\plink.exe, same for ppk file). Just in case, I
tried with forward slashes as well...same failure.

In the meanwhile, I learned about plink -load option, so I tried creating
and saving a putty session for user@externalpc using public key
authentication (which works fine), and then using "plink -load
externalsession -nc %host:%port" as the internal proxy command, but
unfortunately again no joy.

It's instantaneous: I click "connect", and immediately putty's black
window appears, with the error message's white box on top of it ("server
unexpectedly closed network connection"). Just out of curiosity, I tried
running wireshark while I was clicking "connect", it looks like no traffic
at all is produced, I don't even see a SYN packet towards any host!

For what it's worth, this is a 64-bit windows 7 running in a KVM virtual
machine. Are there known issues with some of that?

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacob Nevins  
View profile  
 More options Jan 27, 8:43 am
Newsgroups: comp.security.ssh
From: Jacob Nevins <jac...@chiark.greenend.org.uk>
Date: 27 Jan 2012 13:43:48 +0000 (GMT)
Local: Fri, Jan 27 2012 8:43 am
Subject: Re: Using a local proxy with putty fails immediately

pk <p...@pk.invalid> writes:
>c:\windows\system32\plink.exe
 [...]
>For what it's worth, this is a 64-bit windows 7 running in a KVM virtual
>machine. Are there known issues with some of that?

I suspect that your choice of location for plink.exe is likely to be
your problem.

On 64-bit Windows, the system32 directory is intended for 64-bit
programs. If you put 32-bit programs (such as putty.exe or plink.exe) in
there, they may have problems due to the way the Windows 32-bit
compatibility stuff works.

(I don't know why running plink.exe works for you from the command-line,
as my information about the system32 directory is second-hand, so I
don't know what the nature of the problems you'll run into are.)

If you desperately want to put programs from the PuTTY suite in a
Windows system directory on 64-bit Windows, the right place is probably
c\windows\syswow64 ; better still to put them somewhere else.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pk  
View profile  
 More options Jan 27, 10:18 am
Newsgroups: comp.security.ssh
From: pk <p...@pk.invalid>
Date: Fri, 27 Jan 2012 16:18:09 +0100
Local: Fri, Jan 27 2012 10:18 am
Subject: Re: Using a local proxy with putty fails immediately
On 27 Jan 2012 13:43:48 +0000 (GMT), Jacob Nevins

Thank you! That was indeed the problem. I moved it to another location and
it worked immediately. I wish I found that mentioned in some of the many
pages I read while trying to debug this.

Thanks again.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Owen Dunn  
View profile  
 More options Jan 28, 6:00 am
Newsgroups: comp.security.ssh
From: Owen Dunn <ow...@chiark.greenend.org.uk>
Date: Sat, 28 Jan 2012 11:00:48 +0000
Local: Sat, Jan 28 2012 6:00 am
Subject: Re: Using a local proxy with putty fails immediately

The reason is that the command prompt is a 64-bit executable, so when
it looks for files in c:\windows\system32 it sees the files that are
actually there on the disk.  So cmd.exe can quite happily see
everything of any bittedness in c:\windows\system32.

PuTTY is a 32-bit executable.  On a 64-bit system, when it is told to
open something in c:\windows\system32, it will actually look in
c:\windows\syswow64 .  The upshot of this is that by default 32-bit
executables can't access the content of c:\windows\system32.  (In fact
there is a cheaty way to do so, by accessing c:\windows\sysnative
instead.)

http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx has
some more of the gory details of how file system redirection works on
64-bit Windows.

(S)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacob Nevins  
View profile  
 More options Jan 30, 6:51 am
Newsgroups: comp.security.ssh
From: Jacob Nevins <jac...@chiark.greenend.org.uk>
Date: 30 Jan 2012 11:51:11 +0000 (GMT)
Local: Mon, Jan 30 2012 6:51 am
Subject: Re: Using a local proxy with putty fails immediately

pk <p...@pk.invalid> writes:
>Thank you! That was indeed the problem. I moved it to another location and
>it worked immediately. I wish I found that mentioned in some of the many
>pages I read while trying to debug this.

It's now in the PuTTY FAQ (since a few people have run into it):
<http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html#faq-system32>

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pk  
View profile  
 More options Jan 30, 7:13 am
Newsgroups: comp.security.ssh
From: pk <p...@pk.invalid>
Date: Mon, 30 Jan 2012 13:13:40 +0100
Local: Mon, Jan 30 2012 7:13 am
Subject: Re: Using a local proxy with putty fails immediately
On 30 Jan 2012 11:51:11 +0000 (GMT), Jacob Nevins

<jac...@chiark.greenend.org.uk> wrote:
> pk <p...@pk.invalid> writes:
> >Thank you! That was indeed the problem. I moved it to another location
> >and it worked immediately. I wish I found that mentioned in some of the
> >many pages I read while trying to debug this.

> It's now in the PuTTY FAQ (since a few people have run into it):
> <http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html#faq-system32>

Thanks!

"C:\WINDOWS\SYSTEM32 is intended to contain only 64-bit binaries; Windows'
32-bit binaries live in C:\WINDOWS\SYSWOW64".

Misleading to say the least, if you ask me (I'd expect exactly the reverse).
But we're talking windows after all.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »