0

I am using Ubuntu as desktop and server OS. When I am logged in to the server via SSH on the terminal to change the smb/afp configuration, I can only test the configuration from the server over terminal.

Is there a way to tunnel the connection over SSH (no VPN, only one SSH port is open on the firewall) so that I also could test the connection from my Ubuntu or OS X desktop host?

1 Answer 1

1

You can use ssh to tunnel any port under SSH.

sudo ssh -L 139:localhost:139 user@server

Now if you try to connect to the 139 port in your computer you will be connecting to 139 in the server. Notes:

  • You need to use sudo to open a priviledged port(<1024) on your computer, not nice.
  • It won't work if you're already using port 139 (i.e. you are running samba on the local computer)
  • You will need to use your local computer by IP (we are not tunneling nbm).

Not nice at all, but it's the best idea that I have.

1
  • OS x does not allow to connect to the localhost over afp/smb I'll try Ubuntu later
    – Reivax
    Jan 31, 2011 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .