Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ssh tunneling (was firewall configuration)



>> Just for curiosity and the fact that I know very little about ssh tunnels.
>> Is it possible to open an ssh tunnel to a server through another computer?
>> i.e. I have my workstation. I want open a connection to another workstation,
>> and from that computer open another tunnel to my server. Then from my
>> first workstation, could I connect directly to my server through the
>> two tunnels?
>>
> Yes it is, let me show you an example :
>
>> From my local tibook :
>
> Sudo ssh -L 10548:127.0.0.1:548 email@hidden
> Type password for root then password for email@hidden
>
> (if you now connect to afp://my.server.net:548, you can mount the server's
> volume on the tibook's desktop
>
> Then
>
> On the remote server
> Sudo ssh -L 548:127.0.0.1:548 email@hidden
> Type password for root then password for email@hidden
>
> (if you now connect to afp://127.0.0.1:10548, you can mount the other
> server's volume on the tibook's desktop
>
>
> Here is my terminal session (I changed logins an host names)
>
> [olivier:~] olivier% sudo ssh -L 10548:127.0.0.1:548 email@hidden
> Password:
> email@hidden's password:
> Last login: Sat May 31 14:49:20 2003 from lns-th2-5f-81-5
> Welcome to Darwin!
> [xserve:~] root# ssh -L 548:127.0.0.1:548 email@hidden
> email@hidden's password:
> Last login: Sat May 31 14:51:30 2003 from acaen-202-2-1-3
> Welcome to Darwin!
> [sophie:~] root#
>
> Then the two tunnels are on, I can mount sophie's volume !!! through xserve
> _______________________________________________
If you want to do it directly, you can use :

sudo ssh -L 10548: host2.homeip.net:548 email@hidden

It works fine too

And add -R if you do not want shell on the distant machine (eg : host1)

sudo ssh -R -L 10548: host2.homeip.net:548 email@hidden

You can use SSHTunnelManager to do all of this with GUI !!!
_______________________________________________
macos-x-server mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macos-x-server
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: ssh tunneling (was firewall configuration) (From: Olivier DUCROT <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.