Anton Chisliuk · AI Marketing Ops
Anton Chisliuk
AI Marketing Ops

For Business

How to Set Up an SSH Tunnel With PuTTY

Need secure access to a private database, dashboard, or internal tool? Follow this practical PuTTY SSH tunnel guide to configure local port forwarding, test the connection, and avoid common business-access mistakes.

12 min readWritten by: Anton ChisliukMiddle of funnel

An SSH tunnel lets you securely reach a service that should not be exposed directly to the public internet. For a business, that might mean accessing a database, internal dashboard, CRM integration endpoint, staging server, or vendor-hosted application without opening an unnecessary firewall rule. PuTTY remains a practical Windows tool for this job because it provides a clear interface for SSH connections and port forwarding. This guide explains how to set up an SSH tunnel with PuTTY, how to verify it works, and how to avoid the configuration mistakes that turn a simple security control into an afternoon of troubleshooting.

What an SSH Tunnel Does

An SSH tunnel wraps traffic from one local port inside an encrypted SSH connection. Your computer connects to an SSH server, often called a bastion host or jump box. That server then reaches the destination service from inside the private network. To the application on your computer, the destination may look like localhost. Behind the scenes, SSH is carrying the traffic securely to the remote environment.

A common example is a database that listens on port 3306 for MySQL or port 5432 for PostgreSQL. Rather than allowing every employee IP address to connect to that database over the internet, a company can restrict database access to its private network. An approved user then creates an SSH tunnel through a hardened server and connects their database client to a local port such as 3307 or 5433.

This matters beyond engineering. Marketing, revenue operations, and analytics teams increasingly work with connected systems: reporting databases, event pipelines, lead-routing tools, customer data platforms, and internal dashboards. Secure access decisions affect reporting reliability and operational risk. An SSH tunnel is not a replacement for identity management, access controls, or network architecture, but it is a useful and proven layer in a controlled access workflow.

When a Business Should Use PuTTY SSH Tunneling

Use a PuTTY SSH tunnel when a required service is private, when direct public access would create unnecessary exposure, or when a vendor has provided SSH credentials as the approved access method. It is especially common for development environments, cloud virtual machines, internal databases, and administrative interfaces that should not be indexed, scanned, or broadly reachable.

It can also be useful during implementation work. For example, an operations lead may need to inspect a staging database while validating CRM migrations, website form submissions, attribution data, or automation workflows. The tunnel creates a narrow, purpose-specific path instead of requiring a broad network change. That is generally easier to document, revoke, and audit than a permanent public opening.

Do not use SSH tunneling as a casual workaround for a broken security model. If many people need persistent access, if credentials are shared, or if the tunnel is carrying production traffic for an application, the organization may need a VPN, zero-trust access platform, managed private networking, or a formal bastion-host policy. PuTTY is ideal for an individual operator’s controlled session; it is not an enterprise access strategy by itself.

What You Need Before Configuring PuTTY

Before opening PuTTY, collect four essentials: the SSH server hostname or IP address, your SSH username, your authentication method, and the private destination details. The destination details include its hostname or private IP address and the service port. If you are reaching a PostgreSQL database from a jump host, for example, you need to know whether the database is available as localhost:5432, a private address such as 10.0.1.25:5432, or a DNS name visible only inside the network.

You also need to choose a free local port on your Windows machine. This is the port your local application will use. It does not have to match the destination port. If PostgreSQL is already running locally on 5432, choose 5433. If MySQL is in use on 3306, choose 3307. Selecting an unused local port prevents a conflict that can make a correctly configured tunnel appear broken.

Finally, confirm whether authentication uses a password, an SSH key, or multifactor authentication. PuTTY uses PPK-format key files for classic configurations. If you received an OpenSSH private key, you may need PuTTYgen to convert it to PPK. Treat credentials as production access: store them securely, avoid sending private keys in chat, and remove access when the project or employee relationship ends.

Open PuTTY and select Session in the left navigation. In the Host Name field, enter the hostname or public IP address of the SSH server. Enter port 22 unless your administrator has configured a different SSH port. Confirm that the connection type is set to SSH. This server is the secure entry point, not necessarily the final system you want to reach.

Next, navigate to Connection > SSH > Tunnels. In the Source port field, enter the local port you chose. In the Destination field, enter the private destination in the format host:port. For example, use 127.0.0.1:5432 if the database is running on the SSH server itself, or use 10.0.1.25:5432 if the database is on another private machine reachable from the SSH server.

Select the Local radio button, then click Add. You should see an entry similar to L3307 10.0.1.25:3306 in the forwarded ports list. Go back to Session, enter a memorable saved-session name such as Production Reporting Tunnel, and click Save. Saving the session preserves the configuration, but it does not preserve your password unless you use an approved authentication method.

Example: Forward a Private MySQL Database

Assume your SSH server is bastion.example.com, your database lives at 10.0.1.25:3306, and your computer already has a local MySQL service on port 3306. In PuTTY, set the SSH host to bastion.example.com. Under Tunnels, use source port 3307, destination 10.0.1.25:3306, select Local, and click Add.

After connecting through PuTTY and leaving the session open, configure your MySQL client to connect to host 127.0.0.1 on port 3307. Use the database username and password provided for the database itself. SSH credentials and database credentials are often separate, so do not assume that logging into the jump host grants database access.

The same pattern works for many services. The only variables are the remote host, remote port, and local port. Keep the local endpoint set to 127.0.0.1 unless you have a specific, approved reason to expose the tunnel to other devices on your local network. Binding broadly can turn a personal tunnel into an accidental shared access point.

Configure SSH Keys and Session Security

If your organization uses key-based authentication, go to Connection > SSH > Auth in PuTTY. Browse to the private key file and select the PPK file. Depending on the PuTTY version, the exact label may reference credentials or private key files, but the objective is the same: PuTTY needs the private key that matches an authorized public key on the SSH server.

Key-based authentication is usually preferable to password-only SSH access because it supports stronger, more manageable access controls. Still, a private key is sensitive. Anyone who obtains an unprotected key may be able to authenticate as you. Use a passphrase, limit file permissions, and do not place the file in a shared cloud folder or attach it to a task-management ticket.

Also review the host key warning when connecting for the first time. PuTTY stores the SSH server’s host key fingerprint and alerts you if it changes later. Do not click through a changed fingerprint without checking with the system owner. A changed fingerprint can be legitimate after a server rebuild, but it can also indicate that you are connecting to the wrong server or that the connection is being intercepted.

Connect and Test the SSH Tunnel

Return to the Session screen and click Open. PuTTY will prompt for your SSH username if it was not configured elsewhere, then ask for a password or key passphrase as required. Once authentication succeeds, keep the PuTTY terminal window open. Closing it closes the SSH connection and removes the tunnel.

Now open the application that needs access to the remote service. Point it to localhost or 127.0.0.1, using the local source port you configured. In the MySQL example, the client should connect to 127.0.0.1:3307, not to the private database IP. Your local connection is the front door; PuTTY handles the route beyond it.

Test with a low-risk action first. For a database, validate that you can authenticate and run a read-only query. For an internal web application, open the local URL in a browser. For a service integration, validate one test request before moving data or enabling a scheduled workflow. This small discipline reduces the chance that a wrong port or wrong environment creates a production mistake.

Common PuTTY SSH Tunnel Errors and Fixes

If PuTTY connects successfully but your local application cannot reach the service, check the destination address first. A frequent mistake is entering the SSH server’s public address as the tunnel destination when the actual database is on another private host. Ask the infrastructure owner which host and port are visible from the SSH server, not from your laptop.

If you receive an error that the local port cannot be opened, another program is likely using it. Choose a different source port, update your local client configuration, and reconnect. On Windows, you can inspect port use with the command netstat -ano | findstr :3307. Avoid stopping unfamiliar services just to free a port; select another unused port instead.

If the tunnel works briefly and then disconnects, review network stability and SSH keepalive settings. In PuTTY, go to Connection and set a modest keepalive interval if your policy allows it. This can help prevent idle sessions from being dropped by firewalls or NAT devices. It will not fix a server-side timeout policy, expired credentials, or an unreliable internet connection, so document recurring disconnects for the system owner.

Why "Connection Refused" Does Not Always Mean PuTTY Is Wrong

A connection-refused message often means the SSH tunnel is functioning correctly but the target service is not listening at the specified destination. The remote host may be wrong, the service may be stopped, or the application may be listening only on a different network interface. In that case, changing PuTTY settings repeatedly will not solve the underlying issue.

Separate the layers during troubleshooting. First, verify that the SSH session authenticates. Second, confirm that the PuTTY forwarded-port entry appears in the session. Third, validate the host and port from the SSH server’s perspective with the help of the infrastructure team. Finally, check the local application’s host, port, credentials, and TLS settings.

This layered approach is more useful than guessing because it produces evidence. A short record of the source port, destination host, service port, time of test, and exact error message gives technical teams enough context to resolve access issues quickly. It also prevents business users from requesting broad firewall changes when the problem is only a typo.

Use named accounts whenever possible. Shared SSH logins make it hard to understand who accessed a sensitive system and when. Named accounts support offboarding, least-privilege permissions, and incident investigation. If a contractor needs temporary access, set an expiration date and remove the key when the work is complete.

Keep tunnels narrow. One local port to one approved service is easier to secure than a broad proxy configuration. Dynamic forwarding and remote forwarding have legitimate uses, but they introduce different risks. For most business users accessing one dashboard, database, or internal endpoint, local port forwarding is the simplest and safest starting point.

Document the access workflow in operational terms, not just technical jargon. Specify the system owner, approved users, required authentication, destination host, local-port convention, and revocation process. This is the same principle that keeps revenue systems dependable: clear ownership, visible handoffs, and fewer hidden workarounds. Secure access should support delivery, not become a mystery only one person can operate.

Where SSH Tunnels Fit Into Marketing and Revenue Operations

Not every marketing leader needs to configure a tunnel personally. But leaders do need to recognize when data access is becoming fragile. If paid-media reporting, CRM enrichment, form routing, or analytics dashboards depend on a privately hosted source, access should be intentional. A secure tunnel can support a controlled diagnostic session, while a recurring business process may need a more durable integration architecture.

This is where marketing operations and infrastructure decisions overlap. An automation that cannot reliably reach the right database or API will produce incomplete reports, misrouted leads, and delayed follow-up. Teams should define which systems need human access, which need machine-to-machine access, and which should never be reachable outside a managed private network. For recurring workflow design, a structured marketing automation implementation can help turn fragile manual steps into documented processes.

Anton Chisliuk · AI Marketing Ops works as an operator model rather than an account-manager layer: one senior builder can connect marketing systems, CRM processes, content operations, and automation workflows around measurable business outcomes. That model is relevant when technical access and revenue operations are crossing over. The work is proof-led rather than presentation-led; for example, Cleverence grew from ~200 to 250K organic visits per month through a broader operating system, not a single disconnected tactic. Learn more about Anton Chisliuk · AI Marketing Ops.

When to Use an SSH Tunnel Instead of Other Options

Choose a local SSH tunnel when one approved person needs temporary, encrypted access to a private service and an SSH bastion already exists. It is inexpensive, transparent, and easy to remove when the session ends. It is particularly useful for troubleshooting, database administration, configuration validation, and one-off implementation work.

Choose a VPN or zero-trust access tool when multiple people need repeatable access to several internal services. These tools can centralize identity policies, device checks, logging, and network segmentation. They require more setup, but they reduce the operational burden of asking every user to manage individual tunnels and local-port settings.

Choose a managed API or direct integration when software systems need ongoing access without a human at a keyboard. A scheduled reporting job should not depend on someone leaving PuTTY open on a laptop. Build machine access with scoped credentials, secrets management, monitoring, and clear ownership. The right choice depends on frequency, sensitivity, user count, and the cost of failure.

Before You Share Access With a Vendor or Contractor

Do not send a vendor your personal SSH password or private key. Create a separate named account or separate key, restrict it to the required systems, and record the approval. If the work only requires read access to a reporting database, do not grant server administration privileges. Access should match the job, not the convenience of the moment.

Set a review date. Temporary vendor access has a way of becoming permanent when there is no owner. A simple access register with the person’s name, purpose, system, approval date, expiration date, and revocation status is enough for many growth-stage companies. The goal is not bureaucratic overhead; it is avoiding unknown credentials that remain active after a project ends.

For businesses scaling marketing systems without adding a large internal team, the operational question is broader than PuTTY: who owns the workflows, credentials, reporting definitions, and handoffs? A capable operator should leave systems more understandable, not more dependent on undocumented personal access. That standard matters whether the work covers a server tunnel, HubSpot lifecycle logic, or paid-media attribution.

Conclusion

Setting up an SSH tunnel with PuTTY is straightforward once you separate the three endpoints: your local port, the SSH server, and the private destination service. Configure a local forwarded port, authenticate securely, keep the PuTTY session open, and connect your application to localhost using the chosen port. Most failures come from an incorrect destination host, a port conflict, or confusion between SSH credentials and application credentials.

For business teams, the larger lesson is to treat access as part of operations. A secure tunnel is useful for controlled, temporary work, but recurring processes deserve documented ownership, appropriate permissions, and an architecture that does not rely on hidden manual steps. Build the narrowest access path that gets the job done, then review it as systems and people change.

If your growth systems, CRM, reporting, and automations need a clearer operating plan, start with a free Growth Audit. This article was prepared by Anton Chisliuk.

FAQs

- Is PuTTY still safe to use for SSH tunnels?

PuTTY is safe when downloaded from an official, trusted source and used with current security practices. Use verified server fingerprints, strong authentication, protected private keys, and least-privilege accounts. The security of the tunnel also depends on the SSH server configuration and the access controls around the destination system.

- What is the difference between local and remote port forwarding in PuTTY?

Local port forwarding lets your computer connect through SSH to a remote private service. Remote port forwarding exposes a port on the remote SSH server that forwards back toward your computer or network. For most users who need to access a private database or internal app, local forwarding is the appropriate option.

- Can I close PuTTY after creating the tunnel?

No. The tunnel exists only while the PuTTY SSH session remains connected. If you close the PuTTY window, lose network connectivity, or the server ends the session, the forwarded local port stops working. For persistent application connectivity, use a managed and approved architecture rather than an unattended desktop session.

- Why should my application connect to localhost instead of the remote IP address?

Your application connects to localhost because PuTTY is listening on the local source port you configured. PuTTY then forwards that traffic through the encrypted SSH connection to the remote destination. Connecting directly to the remote private IP from your laptop usually fails because that address is only reachable from within the private network.

- Can I use one SSH tunnel for several services?

You can configure multiple local forwarding rules in one PuTTY session, with a different local source port for each destination. However, keep the setup deliberate and documented. Multiple tunnels are useful for related troubleshooting work, but broad, long-lived access should be reviewed for a more maintainable solution.

Written by

Anton Chisliuk

Founder & Lead Operator · AI Marketing Operator

Anton Chisliuk is a GTM Engineer and Marketing Systems Architect. He built Cleverence's AI-native revenue OS (88 Make blueprints, MCP hub, ~200→250K organic, 2,200+ leads/mo) and now delivers outsourced GTM Engineering — CRM, automation, SEO, outbound — for growth-stage businesses via aimrktops.com.

About Anton →

Ready to fix this — for real?

Book a free Growth Audit. No sales deck — a 30-minute conversation about your pipeline, stack, and what to ship first.