Re: SSH Tunnel from Access (General questions)
Hi Rich,
First we need to find out what is cosing your problem and we will try than to resolve it.
I presume you are able to establish connection from wodSSHTunnel to wodSSHServer where Access database is.
After connection is establish you could have problem with permissions on servers machine , if you are limited user or firewall i turned on. Please try to check this.
Other problem could be with port 139. You will found explanation how to turn it on here (this link has explanation with picture and it will help you more that I can try to explain):
http://www.petri.co.il/what's_port_445_in_w2k_xp_2003.htm
Next problem could with binding to any loopback address other than 127.0.0.1.
This bug was introduced by XP SP2. For information on a fix, visit:
http://support.microsoft.com/default.aspx?scid=kb;[LN];884020
If all is done, here is code that you need to use in wodSSHTunnel:
---------------------------------
Option Explicit
Dim WithEvents SSH_1 As wodTunnelCom
Private Sub Command1_Click()
SSH_1.Hostname = your_server_name
SSH_1.Login = your_login
SSH_1.Password = your_password
SSH_1.Connect
End Sub
Private Sub ssh_1_Connected()
AddToList CONNECTED
SSH_1.Channels.Add LocalListen, 127.0.0.2 , 139, your_server_name , 139
SSH_1.Channels.StartAll
End Sub
Private Sub ssh_1_ChannelStart(ByVal Chan As wodSSHTunnelCOMLib.IChannel)
AddToList Channel start , remote port & Chan.RemotePort
End Sub
Private Sub ssh_1_ChannelStop(ByVal Chan As wodSSHTunnelCOMLib.IChannel, ByVal ErrorCode As Integer, ByVal ErrorText As String)
AddToList Channel stop & ErrorText
End Sub
Private Sub SSH_1_UserConnected(ByVal Chan As wodSSHTunnelCOMLib.IChannel, ByVal User As wodSSHTunnelCOMLib.IUser, ByVal ErrorCode As Integer, ByVal ErrorText As String)
AddToList User from & User.Hostname & connected
End Sub
Private Sub ssh_1_UserConnecting(ByVal Chan As wodSSHTunnelCOMLib.IChannel, ByVal Hostname As String, ByVal Port As Long, Allow As Boolean)
' allow anyone
Allow = True
End Sub
---------------------------------
Let us know how it goes.
Regards,
Drazen