Viscosity is a professional SSH client available for macOS that provides a graphical interface for managing remote server connections. It allows you to store server details, keys, and configuration settings in a central database so you do not have to type long commands into the Terminal.

Viscosity Simplifies SSH Connection Management

Viscosity acts as a wrapper for the native macOS Terminal or other terminal emulators. Instead of remembering IP addresses and usernames, you create a "Host" entry within the application. When you double-click a host, Viscosity generates the correct SSH command and launches your chosen terminal to establish the connection.

The software organizes your servers into folders, which is useful for users managing multiple environments like development, staging, and production. You can assign different colors to these folders to prevent accidentally running commands on a live production server when you intended to use a test environment.

Because it integrates with the system's existing SSH infrastructure, it respects your local ~/.ssh/config file. If you already have a complex configuration file, Viscosity can import those settings, allowing you to transition from a command-line workflow to a graphical one without losing your existing setups.

Viscosity Uses Your Existing Terminal

A common misconception is that Viscosity is a standalone terminal emulator like iTerm2 or the default macOS Terminal. In reality, Viscosity is a connection manager that tells another terminal application which server to connect to and how to do it.

You must have a terminal application installed on your Mac for Viscosity to function. While the default Terminal app is always present, many users prefer third-party options for better window management or font rendering. Viscosity allows you to select which of these applications should be triggered when you initiate a connection.

To set your preferred terminal, navigate to the application settings. Labels may differ slightly by version, but you generally find this under Settings > General or a similar Preferences menu. From there, you can choose the specific application path for your terminal emulator.

Configuring Your First Host Connection

Setting up a server requires a few specific pieces of information to ensure the handshake between your Mac and the remote server is successful. Follow these steps to create a new connection:

  1. Open Viscosity and select the "New" or "+" button to create a new host.
  2. Enter a descriptive name for the host in the Name field.
  3. Input the Hostname or IP address of the remote server.
  4. Specify the Port, which is typically 22 for standard SSH connections.
  5. Enter the Username you will use to log into the server.
  6. Select your authentication method, such as a password or a private key file.
  7. Save the host and double-click it in the list to launch the connection.

If you are using a private key, you will need to point Viscosity to the file location on your hard drive, typically found in the .ssh folder in your user directory. If your key is protected by a passphrase, you can choose to store that passphrase within Viscosity's encrypted database to avoid typing it every time you connect.

Managing Authentication and Security

Security is the most critical part of any SSH setup. Viscosity provides several ways to handle credentials depending on your security requirements and the server's configuration.

Method Security Level Best Use Case
Password Standard Internal test servers with limited access
SSH Key High Production environments and secure cloud VPS
SSH Agent Very High Users who prefer managing keys via ssh-agent

When using SSH keys, you can choose between "Identity File" and "SSH Agent". Using the Identity File tells Viscosity to pass the specific path of the key to the terminal command. Using the SSH Agent allows Viscosity to rely on the macOS system agent that already holds your decrypted keys in memory.

For those working in corporate environments, you may encounter "Jump Hosts" or "Bastion Servers". This is a setup where you must first connect to one secure server before you can access the target server. Viscosity supports this by allowing you to designate one host as a proxy for another, automating the multi-step login process into a single click.

Optimizing the Connection Experience

Once your basic connections are working, you can refine how the terminal behaves to make your workflow more efficient. This involves adjusting the environment variables and terminal settings passed during the connection phase.

One practical rule of thumb is to always use a unique color for your production server folders. Set your production folder to red and your development folder to green. This visual cue serves as a constant reminder of where you are working, reducing the risk of executing a destructive command on a live site.

You can also configure "Custom Commands" within a host's settings. If you find yourself running the same three commands every time you log into a specific server—such as checking disk space or navigating to a specific directory—you can script these to run immediately after the connection is established.

Handling Connection Timeouts

If your connection drops frequently, it is often due to the server closing "idle" connections. You can fix this by adding a "Server Alive Interval" in the host settings. Setting this to about 60 seconds tells your Mac to send a small packet of data to the server every minute, which keeps the session active and prevents the terminal from freezing.

Managing Multiple Identities

If you have different keys for different clients or projects, create separate folders in Viscosity for each entity. Within each folder, you can apply a "Folder Default" for the username or key. This means any new host added to that folder will automatically inherit those settings, saving you from entering the same username and key path for twenty different servers in the same cluster.

Viscosity Integration with macOS System Tools

Viscosity does not replace the command line; it enhances it. Because it uses the underlying system SSH, any changes you make to your global SSH configuration in /etc/ssh/ssh_config or ~/.ssh/config will still apply.

If you use a tool like Homebrew to install a newer version of OpenSSH, Viscosity will utilize that updated version provided it is the one linked in your system path. This allows you to use the latest encryption algorithms and security patches without waiting for a software update from the Viscosity developers.

To verify which version of SSH Viscosity is triggering, open a connection and type ssh -V in the resulting terminal window. This will display the version number of the SSH client currently in use on your Mac.

Viscosity for Advanced Network Environments

In complex network topologies, you may need to tunnel traffic from a remote server to your local machine. This is known as SSH Port Forwarding. Viscosity provides a graphical interface to set up these tunnels without needing to remember the -L or -R flags in the command line.

To set up a tunnel, go to the host settings and look for the "Tunnels" or "Port Forwarding" section. You will need to specify the local port (e.g., 8080), the remote destination (e.g., localhost), and the remote port (e.g., 80). Once saved, Viscosity will include these parameters in the SSH command it sends to your terminal.

This is particularly useful for accessing database management tools on your Mac that need to connect to a database residing on a remote server that does not allow direct external connections. By tunneling the database port, your local software thinks the database is running on your own machine.

Syncing Settings Across Macs

If you use multiple Macs, you can export your host list to a file. This allows you to move your entire server database from one machine to another. Be aware that while the host details are exported, the actual private key files on your hard drive are not. You must manually copy your .ssh folder to the new machine and ensure the file paths in Viscosity match the new locations.

Updating Host Credentials

When a server password changes or a key is rotated, you only need to update the information in one place. Navigate to the host in the Viscosity list, right-click to edit, and update the credential. This update is immediately applied to all future connection attempts, ensuring you never have to hunt through scripts or history files to update hardcoded credentials.