This sort of problem is often solved using an ssh tunnel. For example, instead of connecting to server:1234, you connect to localhost:1234 which was setup as a tunnel to server:1234. This solution involves running a bit of software on both the client (putty) and the server (???).