Skip to main content
added 162 characters in body
Source Link
Benjamin Jones
  • 644
  • 2
  • 22
  • 45

Well I figured out the answer to my OWN question. This resolves the question "How to connect to a share using SSH Reverse" If you do not know what SSH Reverse is please disregard this solution!

My setup: Computer A= Ubuntu Server running SSH Server at home. (Diff network)

Computer B= Windows Desktop behind work firewall (cannot open ports) (Diff network)

Like I said, I CANNOT open ports for Computer B and I need Computer A to be able to mount a share (securely) on Computer B .

What this means:To share file between Computer A and Computer B I cannot use FTP,SFTP,or even SSH using port forward because the Ports on Computer B are not open!

HOWEVER, there is a solution to this! Its called SSH Reverse. I won't get to far into this but for my setup Computer A has a SSH Server running on it and Computer B has a client(like putty/plink). Remember to goal is to share files with Computer B from Computer A so in this scenario you MUST you SSH reverse.

So 1st make sure you can communicate/connect with your SSH Server on Computer A with your client (I'm using putty) on Computer B. Works? Great moving on...

Now you need to setup your Reverse Port Forward in putty (on Computer B) by selecting saved connection and going to Tunnel option. Next you need to "Add new port forward".

The source port can be any open port. If your not sure use: 5454. The destination should be: localhost:445 NOTE: destination DOES NOT have to be localhost, in fact localhost may output as "Host Down". It can be any IP on network. Example 192.168.1.1:445 (your own IP)

Make sure the Remote button and Auto button are selected. Then click Add and make sure you SAVE the settings for that connection before you open that connection. Now connect to your SSH Server (Computer A).

Now don't forget to create a mount folder( any folder that the mount share will show up in).

Now you should be able to mount your share on Computer B with Computer A with out opening any ports.

Example mount code:

sudo mount -t cifs //localhost/sambashare /mountpoint -o port=5454,username="",password="",domain="optional"

Well I figured out the answer to my OWN question. This resolves the question "How to connect to a share using SSH Reverse" If you do not know what SSH Reverse is please disregard this solution!

My setup: Computer A= Ubuntu Server running SSH Server at home. (Diff network)

Computer B= Windows Desktop behind work firewall (cannot open ports) (Diff network)

Like I said, I CANNOT open ports for Computer B and I need Computer A to be able to mount a share (securely) on Computer B .

What this means:To share file between Computer A and Computer B I cannot use FTP,SFTP,or even SSH using port forward because the Ports on Computer B are not open!

HOWEVER, there is a solution to this! Its called SSH Reverse. I won't get to far into this but for my setup Computer A has a SSH Server running on it and Computer B has a client(like putty/plink). Remember to goal is to share files with Computer B from Computer A so in this scenario you MUST you SSH reverse.

So 1st make sure you can communicate/connect with your SSH Server on Computer A with your client (I'm using putty) on Computer B. Works? Great moving on...

Now you need to setup your Reverse Port Forward in putty (on Computer B) by selecting saved connection and going to Tunnel option. Next you need to "Add new port forward".

The source port can be any open port. If your not sure use: 5454. The destination should be: localhost:445

Make sure the Remote button and Auto button are selected. Then click Add and make sure you SAVE the settings for that connection before you open that connection. Now connect to your SSH Server (Computer A).

Now don't forget to create a mount folder( any folder that the mount share will show up in).

Now you should be able to mount your share on Computer B with Computer A with out opening any ports.

Example mount code:

sudo mount -t cifs //localhost/sambashare /mountpoint -o port=5454,username="",password="",domain="optional"

Well I figured out the answer to my OWN question. This resolves the question "How to connect to a share using SSH Reverse" If you do not know what SSH Reverse is please disregard this solution!

My setup: Computer A= Ubuntu Server running SSH Server at home. (Diff network)

Computer B= Windows Desktop behind work firewall (cannot open ports) (Diff network)

Like I said, I CANNOT open ports for Computer B and I need Computer A to be able to mount a share (securely) on Computer B .

What this means:To share file between Computer A and Computer B I cannot use FTP,SFTP,or even SSH using port forward because the Ports on Computer B are not open!

HOWEVER, there is a solution to this! Its called SSH Reverse. I won't get to far into this but for my setup Computer A has a SSH Server running on it and Computer B has a client(like putty/plink). Remember to goal is to share files with Computer B from Computer A so in this scenario you MUST you SSH reverse.

So 1st make sure you can communicate/connect with your SSH Server on Computer A with your client (I'm using putty) on Computer B. Works? Great moving on...

Now you need to setup your Reverse Port Forward in putty (on Computer B) by selecting saved connection and going to Tunnel option. Next you need to "Add new port forward".

The source port can be any open port. If your not sure use: 5454. The destination should be: localhost:445 NOTE: destination DOES NOT have to be localhost, in fact localhost may output as "Host Down". It can be any IP on network. Example 192.168.1.1:445 (your own IP)

Make sure the Remote button and Auto button are selected. Then click Add and make sure you SAVE the settings for that connection before you open that connection. Now connect to your SSH Server (Computer A).

Now don't forget to create a mount folder( any folder that the mount share will show up in).

Now you should be able to mount your share on Computer B with Computer A with out opening any ports.

Example mount code:

sudo mount -t cifs //localhost/sambashare /mountpoint -o port=5454,username="",password="",domain="optional"
Source Link
Benjamin Jones
  • 644
  • 2
  • 22
  • 45

Well I figured out the answer to my OWN question. This resolves the question "How to connect to a share using SSH Reverse" If you do not know what SSH Reverse is please disregard this solution!

My setup: Computer A= Ubuntu Server running SSH Server at home. (Diff network)

Computer B= Windows Desktop behind work firewall (cannot open ports) (Diff network)

Like I said, I CANNOT open ports for Computer B and I need Computer A to be able to mount a share (securely) on Computer B .

What this means:To share file between Computer A and Computer B I cannot use FTP,SFTP,or even SSH using port forward because the Ports on Computer B are not open!

HOWEVER, there is a solution to this! Its called SSH Reverse. I won't get to far into this but for my setup Computer A has a SSH Server running on it and Computer B has a client(like putty/plink). Remember to goal is to share files with Computer B from Computer A so in this scenario you MUST you SSH reverse.

So 1st make sure you can communicate/connect with your SSH Server on Computer A with your client (I'm using putty) on Computer B. Works? Great moving on...

Now you need to setup your Reverse Port Forward in putty (on Computer B) by selecting saved connection and going to Tunnel option. Next you need to "Add new port forward".

The source port can be any open port. If your not sure use: 5454. The destination should be: localhost:445

Make sure the Remote button and Auto button are selected. Then click Add and make sure you SAVE the settings for that connection before you open that connection. Now connect to your SSH Server (Computer A).

Now don't forget to create a mount folder( any folder that the mount share will show up in).

Now you should be able to mount your share on Computer B with Computer A with out opening any ports.

Example mount code:

sudo mount -t cifs //localhost/sambashare /mountpoint -o port=5454,username="",password="",domain="optional"