11

my home is Linux servers where SSH can always be used to get around a slightly-too-restrictive firewall. At work however, all of the servers we deal with are Windows based.

I'm needing to connect to a SQL Server 2000 instance running on a Windows 2008 server. The server is behind a firewall that appears to block all incoming ports except for remote desktop. There is suppose to be a VPN, but for some reason it's gone out and judging by how fast we finally got access to remote desktop, it'd probably be a few weeks before we could get an exception placed in the firewall or the a user added to the VPN.

So now I'm looking for a quick solution to get around it. What's the best way to get around it?

Also, the computers we use to connect to the server runs Windows 7. And we have administrator access to the server, but we'd prefer not to install anything permanently

3
  • Hate to say it but I think you are hosed. Remote Desktop won't let you do any kind of cool tunneling. :/
    – NitroxDM
    Commented Nov 4, 2011 at 22:40
  • @Nitro is there an SSH server that runs on Windows 7 that supports tunneling? Because I could run a standalone version of Putty on the server because I know it supports tunneling, I'd just have to do it in reverse maybe?
    – Earlz
    Commented Nov 4, 2011 at 22:42
  • I answered below. But I don't know if it will let you go the other way around. That is using putty on the server and running ssh on your box. I haven't tried it but something tells me it won't work. Give it a go anyway and find out.
    – NitroxDM
    Commented Nov 4, 2011 at 22:51

3 Answers 3

4

What's wrong with using Remote Desktop? What else are you trying to achieve? You say you're coming from a Windows 7 client into a Windows 2008 server and Remote Desktop is available. I don't understand the problem. Remote Desktop Server can be configured to let you choose from different internal servers from your client at home, with the proper voodoo. Your firewall sysadmin would be in control of this.

Vandyke Software has a solid SSH server product for Windows Server. It isn't free but it works. Firewalls aside, you can connect from Putty or any SSH client, and port forward. http://www.vandyke.com/products/vshell/

There's always gotomypc.com or that ilk.

How about this, presuming SSH is allowed outbound:

  1. Run putty.exe on the server as Administrator with REMOTE port forwarding configured as part of a connection profile to your home Linux SSH server. This is the equivalent OpenSSH command if you have that on Win2008 like NitroxDM:

    [root@sqlserver]# ssh -R 5005:127.0.0.1:1433 [email protected]

    From the putty docs:

    You can also forward ports in the other direction: arrange for a particular port number on the server machine to be forwarded back to your PC as a connection to a service on your PC or near it. To do this, just select the ‘Remote’ radio button instead of the ‘Local’ one. The ‘Source port’ box will now specify a port number on the server (note that most servers will not allow you to use port numbers under 1024 for this purpose).

    If you're running Putty as Administrator, that should work in theory. It works from root in Linux, so it seems worth a shot.

  2. Leave that running. Go home and connect from your SQL Console on your Windows 7 laptop to your home Linux box, which we're now treating as your own personal hackerish gotomypc.com server. That Linux box is now listening on TCP port 5005, and connections to that port will forward backwards over Putty to port 1433 (SQL) on Win2008. Configure your SQL tool, or command line, whatever, to connect to mylinux.athome.com:5005 and see what happens.

4
  • Wow that actually sounds like it could work
    – Earlz
    Commented Nov 6, 2011 at 16:43
  • @Earlz Did you try it yet? I'm eager to hear how it worked!
    – IcarusNM
    Commented Nov 19, 2011 at 4:58
  • How it worked: SSH (with remote(?) forwarding) to my Linux VPS server from the Windows Server with Putty. Then ssh from my work computer to my Linux server with local(?) forwarding. Worked like a charm and completely secure
    – Earlz
    Commented Nov 20, 2011 at 20:28
  • Awesome! How about an "accept" checkmark here?
    – IcarusNM
    Commented Nov 20, 2011 at 21:53
1

OpenSSH is available in Windows since Windows 10 and Windows Server 2019.

1
  • Great edit @Saaru Lindestøkke. Apologies for not being more explicit. #Laziness.
    – JJS
    Commented May 12, 2022 at 12:34
0

I use OpenSSH on Windows. But I don't think that will solve your issue. Once you had ssh up and running you couldn't switch to the open firewall port without cutting off Remote Desktop.

Sounds like you will have to wait for the VPN. Or export the data (I'm assuming that is why your are connecting) to a local server.

Good luck.

4

You must log in to answer this question.

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