Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am actually working from PC1 (using Mac OSX) on a distant computer(Linux) PC2 using SSH.

This distant computer PC2 does not have any connection to Internet but is in a network with a PC3 (Windows XP) which has no internet connection.

I shared a folder on my PC3 desktop and I would like to be able to use it directly on PC1, using OSX.

I think it's a double SSH tunnelling problem here.

How can I double SSH my packets in a way that I will be able to use my shared folder's PC3 from PC1?

Everything should be done from Terminal if possible, and in a one-line command.

My Mac OSX computer has an Internet access, but it's the only one.

share|improve this question
    
They're not all connected, right? Thus you need to go from PC1 via PC2 to PC3? (I don't quite see the need for SSH here, are we talking about a home setup or a hostile environment (i.e.g work place)?) –  sr_ Oct 11 '12 at 6:58
    
You haven't been clear enough here; "This distant computer PC2 does not have any connection to Internet but is in a network with a PC3" So how can PC2 and PC1 be connected? If they are on the same network then please state this –  jwbensley Dec 19 '12 at 13:25
    
PC2 and PC3 are in a virtual network using VMware. It's in a laboratory context, so I don't know what is the real architecture behind the laboratory. –  Pier-Alexandre Bouchard Dec 19 '12 at 19:06
add comment

1 Answer 1

MACOSX-PC1$ ssh -L 445:<WINDOWS-PC3-ADDREES>:445 yourlogin@<LINUX-PC2-ADDRESS>

... now you are binding the 445 port (the SMB TCP port) of PC3 on your PC1 loopback interface... Now you need to recognise the local condivision at MacOSX, I don't know how!!

Alternatively I suggest to mount SMB condivision on PC2, then accesses to this folder from PC3 by sftp!

Alternatively you can install a Openvpn server on your linux server and then you can full accessing to your remote network!

share|improve this answer
1  
This is exactly what I've done yesterday, I this will not work –  Pier-Alexandre Bouchard Oct 11 '12 at 15:33
    
After creating the ssh tunnel, check if the socket server is accessible: telnet localhost 445 –  ilbazzo Oct 19 '12 at 19:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.