fixunix
Tags Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

using ProxyCommand - SSH

This is a discussion on using ProxyCommand - SSH ; Hello, I can do ssh -fN -L 9022: :22 @ ssh -XC -p 9022 localhost to get a ssh connection with X-forwarding to the remote XServer tunneled through . I tried to get the same with ssh -XC -p 9022 ...


Fix Unix > Technologies & Tools > Protocols > SSH > using ProxyCommand

Reply
 
LinkBack Tools
  #1  
Old 12-13-2007, 10:29 AM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default using ProxyCommand

Hello,

I can do

ssh -fN -L 9022::22 @
ssh -XC -p 9022 localhost

to get a ssh connection with X-forwarding to the remote XServer tunneled
through . I tried to get the same with

ssh -XC -p 9022 \
-oProxyCommand="ssh -L 9022::22 @" \
localhost

but this fails. Where do i misunderstand the concept of ProxyCommand?

Thank you for any hints
Wolfgang
Reply With Quote
  #2  
Old 12-13-2007, 03:23 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: using ProxyCommand


> Hello,
> I can do
>
> ssh -fN -L 9022::22 @
> ssh -XC -p 9022 localhost
>
> to get a ssh connection with X-forwarding to the remote XServer tunneled
> through . I tried to get the same with
>
> ssh -XC -p 9022 \
> -oProxyCommand="ssh -L 9022::22 @" \
> localhost
>
> but this fails. Where do i misunderstand the concept of ProxyCommand?


ssh -XC -oProxyCommand="ssh @ nc %h %p" remote-XServer

There is no longer any need for the indirection of port forwarding. This
requires that you have something like nc (netcat) on ssh-server.

--
Richard Silverman
res@qoxp.net

Reply With Quote
  #3  
Old 12-14-2007, 01:40 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: using ProxyCommand

Richard E. Silverman schrieb:
>> Hello,
>> I can do
>>
>> ssh -fN -L 9022::22 @
>> ssh -XC -p 9022 localhost
>>
>> to get a ssh connection with X-forwarding to the remote XServer tunneled
>> through . I tried to get the same with
>>
>> ssh -XC -p 9022 \
>> -oProxyCommand="ssh -L 9022::22 @" \
>> localhost
>>
>> but this fails. Where do i misunderstand the concept of ProxyCommand?

>
> ssh -XC -oProxyCommand="ssh @ nc %h %p" remote-XServer
>
> There is no longer any need for the indirection of port forwarding. This
> requires that you have something like nc (netcat) on ssh-server.
>


Thank you for your answer. I think i really misunderstood the concept of
-oProxyCommand. Is it true, that if there is a -oProxyCommand, there
can not be a -p Option because ssh does not use TCP but
to communicate to the server?

What do you mean by "There is no noner any need ..."? Is -oProxyCommand
an older concept then portforwarding?

Wolfgang
Reply With Quote
  #4  
Old 12-14-2007, 08:41 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: using ProxyCommand

>>>>> "WM" == Wolfgang Meiners writes:

WM> Richard E. Silverman schrieb:
>>> Hello, I can do
>>>
>>> ssh -fN -L 9022::22 @ ssh -XC -p
>>> 9022 localhost
>>>
>>> to get a ssh connection with X-forwarding to the remote XServer
>>> tunneled through . I tried to get the same with
>>>
>>> ssh -XC -p 9022 \ -oProxyCommand="ssh -L 9022::22
>>> @" \ localhost
>>>
>>> but this fails. Where do i misunderstand the concept of
>>> ProxyCommand?

>> ssh -XC -oProxyCommand="ssh @ nc %h %p"
>> remote-XServer
>>
>> There is no longer any need for the indirection of port forwarding.
>> This requires that you have something like nc (netcat) on
>> ssh-server.
>>


WM> Thank you for your answer. I think i really misunderstood the
WM> concept of -oProxyCommand. Is it true, that if there is a
WM> -oProxyCommand, there can not be a -p Option because ssh does not
WM> use TCP but to communicate to the server?

You can specify a port with -p, but as you say it will not be used by the
top SSH client. Instead, it will affect the interpretation of the %p
parameter in the ProxyCommand string.

WM> What do you mean by "There is no noner any need ..."? Is
WM> -oProxyCommand an older concept then portforwarding?

I meant, you didn't need the port forwarding once you changed to using
ProxyCommand.

--
Richard Silverman
res@qoxp.net

Reply With Quote
Reply

Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
ProxyCommand and ExitOnForwardFailure = leftover process unix openssh 0 08-13-2008 01:09 PM
PuTTY and ProxyCommand unix SSH 10 10-03-2007 04:17 AM
Putty and ProxyCommand Support? unix SSH 4 10-03-2007 04:12 AM


All times are GMT. The time now is 09:39 AM.