SQL Server through SSH

View: New views
5 Messages — Rating Filter:   Alert me  

SQL Server through SSH

by ianadavies :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

I am trying to access my mssql server through SSH but without much joy.

My SQL 2005 server is on a local ip of 192.168.1.5. My SSH server is on a local ip of 192.168.1.7 which i access through port 22 on my router via dyndns. My SSH server is a ARM cpu based NSLU2 running debian

I tunnel in and setup port forwarding in putty as follows

L1433 192.168.1.5:1433 and then point my connection string to (local)

However when i try to create a connection i get PreHandshakeLogin() Failiure. Do I need to setup some ip table routing to make this work? please be verbose with your replies as I am quite new to this port forwarding stuff.

Re: SQL Server through SSH

by Bashar :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

ianadavies wrote, On 3/1/2008 3:43 PM:

> I am trying to access my mssql server through SSH but without much joy.
>
> My SQL 2005 server is on a local ip of 192.168.1.5. My SSH server is on a
> local ip of 192.168.1.7 which i access through port 22 on my router via
> dyndns. My SSH server is a ARM cpu based NSLU2 running debian
>
> I tunnel in and setup port forwarding in putty as follows
>
> L1433 192.168.1.5:1433 and then point my connection string to (local)
>
> However when i try to create a connection i get PreHandshakeLogin()
> Failiure. Do I need to setup some ip table routing to make this work? please
> be verbose with your replies as I am quite new to this port forwarding
> stuff.
>
>  
mssql or mysql ?

Re: SQL Server through SSH

by Joseph Spenner :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

--- ianadavies <ian_a_davies@...> wrote:

> My SQL 2005 server is on a local ip of 192.168.1.5.
> My SSH server is on a
> local ip of 192.168.1.7 which i access through port
> 22 on my router via
> dyndns. My SSH server is a ARM cpu based NSLU2
> running debian
>
> L1433 192.168.1.5:1433 and then point my connection
> string to (local)

After you build the tunnel, try this.  Open a command
window, and:

telnet localhost 1433

Does it "connect" you to some tcp connection and hang
there?




      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: SQL Server through SSH

by ianadavies :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Its MS SQL, but thanks I have sorted this now the problem was with the Windows Firewall blocking the port. I forgot to check the obvious first!

Thanks

Bashar wrote:
mssql or mysql ?

Re: SQL Server through SSH

by JohnFinkle :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

I am having the same issue as Ian mentioned previously.  I can connect with telnet via localhost.  It does connect and hang, as you specified.  In tcpview I can see a connection made for sqlserver.exe when I telnet in.  But I still cannot get SQL to connect. When connecting via sql (eg. osql) tcpview shows no actions.

Joseph Spenner wrote:
After you build the tunnel, try this.  Open a command
window, and:

telnet localhost 1433

Does it "connect" you to some tcp connection and hang
there?