The first thing to do is to make sure the sshd daemon is installed and running on linux_2 and that linux_1 has SSH installed.
Next on linux_1 we need to set up an SSH tunnel from the local port 139 to the windows_server port 139, the SSH tunnel needs to bounce through linux_2 for linux_1 to be able to reach windows_server. You will need to be root to open this SSH tunnel as port 139 is a privileged port. (It is possible to set this up on a different local port if you wish to run SSH from user space and then you must specify the port to use in your smbmount command discussed later in this document.) The command to set up the tunnel using the SSH2 protocol is as follows.
ssh -2 -q -f -N -g -L 139:windows_server:139 username@linux_2
In this example I have used hostnames 'windows_server' and 'linux_2' - these should be replaced with the ip addresses of the machines you wish to connect to. The first '139' corresponds to the port of the local machine, then the destination server and port are specified, and finally the username@linux_2 is the server you wish the ssh tunnel to bounce through. After executing this command you should be prompted for the password for 'username' on server linux_2 .