[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh -t B sftp C



Niels L. Ellegaard wrote:
>Cristian Gutierrez <crgutier@dcc.uchile.cl> writes:
>
>>ssh -X B ssh -X C xclock
>
>Is i possible to do something similar with sftp? The following creates
>an sftp line from b to c, but I wish to create a line from a to c.
>
>ssh -t B sftp C 

Yes, indirectly. You first need to tunnel some high port on A to port 22
on C, through B:

  ssh -L 9999:C:22 -fN B

And then make your local sftp connect to the forwarded port on A:

  sftp -oPort=9999 A

(replace A by 127.0.0.1, localhost or another alias if it complains
about an invalid host key; it's obviously reading it from C, so it won't
match a previously stored one)

-- 
Cristian Gutierrez			http://www.dcc.uchile.cl/~crgutier
crgutier[@]dcc.uchile.cl                        Jabber:crgutier@jabber.org

"Confucius say: He who play in root, eventually kill tree." 



Reply to: