sodcalculator

10 Tech How-To

How to Install PuTTY on Ubuntu

Guide 10-53268 · Updated · Step by step

PuTTY is a free and open-source terminal emulator, serial console, and network file transfer application. It is most commonly used to connect to remote servers via SSH, Telnet, or serial ports. This guide will walk you through the different ways to install PuTTY on Ubuntu, including the command-line method, the graphical software center, and building from source if you need the latest version.

What You’ll Need

  • An Ubuntu system (desktop or server) with an active internet connection.
  • Access to a terminal (Ctrl+Alt+T on desktop) or the ability to run commands as a user with sudo privileges.
  • For the source build method: basic build tools like gcc, make, and cmake (we’ll show how to install them).

Step-by-Step

Method 1: Install via APT (Recommended)

The easiest and most common way is to use Ubuntu’s package manager. This installs a stable, well-tested version that integrates with your system updates.

  1. Open a terminal window.
  2. Update your package list to ensure you get the latest available version:
    sudo apt update
  3. Install PuTTY:
    sudo apt install putty
  4. When prompted, type Y and press Enter to confirm the installation.
  5. Once the installation finishes, you can launch PuTTY from the terminal by typing putty, or find it in your applications menu under “Internet” or “System Tools”.

Method 2: Install via Ubuntu Software Center

If you prefer a graphical interface, this is the simplest route.

  1. Open “Ubuntu Software” from the dock or applications menu.
  2. Click the search icon (magnifying glass) and type “putty”.
  3. Look for the entry titled “PuTTY” (usually published by the Ubuntu community). Click it.
  4. Click the “Install” button. You may be asked for your password.
  5. Wait for the download and installation to complete. Once done, you can launch PuTTY from the software center or your applications menu.

Method 3: Install the Latest Version from Source

If you need features from the newest release that isn’t yet in Ubuntu’s repositories, you can compile it yourself. This is more involved but gives you the latest code.

  1. Install the necessary build dependencies:
    sudo apt install build-essential cmake
  2. Download the latest source tarball from the official PuTTY website (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html). Look for the “Unix source” tarball, e.g., putty-0.81.tar.gz.
  3. Extract the tarball:
    tar -xzf putty-0.81.tar.gz
  4. Change into the extracted directory:
    cd putty-0.81
  5. Run the configure script to set up the build:
    ./configure
  6. Compile the source code:
    make
  7. Install the compiled binaries system-wide:
    sudo make install
  8. After this, you can run putty from the terminal. Note that the binary may be installed to /usr/local/bin, which is usually in your PATH.

Common Mistakes

  • Not updating the package list before installing. If you skip sudo apt update, you might get an older version or a “package not found” error.
  • Using sudo with the graphical installer. If you launch Ubuntu Software with sudo, it can cause permission issues. Just use the normal user interface.
  • Forgetting to install build dependencies when compiling. Without build-essential and cmake, the configure or make step will fail with cryptic errors.
  • Typing the wrong package name. The package is putty, not putty-tools (that’s a separate package for command-line tools like pscp and plink). If you need those, install putty-tools as well.

Tips

  • If you plan to use PuTTY frequently, you can add it to your favorites bar in the GNOME desktop by right-clicking its icon and selecting “Add to Favorites”.
  • To also get the command-line tools like pscp (secure copy) and plink (command-line SSH), install the companion package: sudo apt install putty-tools.
  • You can launch PuTTY directly to a session from the terminal, e.g., putty -ssh user@example.com.
  • PuTTY stores its configuration in the registry on Windows, but on Linux it uses a plain text file at ~/.putty (or ~/.config/putty on newer versions). You can back this up to keep your saved sessions.

Troubleshooting

“Unable to locate package putty”

This usually means your package list is outdated. Run sudo apt update first, then try again. If it still fails, check that your Ubuntu release is still supported (not EOL). You can also try sudo apt upgrade to refresh the system.

PuTTY doesn’t open after installation

If clicking the icon does nothing, try launching it from the terminal. If you get an error like “command not found”, the binary may not be in your PATH. For the APT method, it should be in /usr/bin/putty. For the source build, it might be in /usr/local/bin. You can run it directly: /usr/bin/putty or /usr/local/bin/putty.

Compilation fails during make

This is often due to missing dependencies. Make sure you have build-essential and cmake installed. Also, check that you have the GTK development libraries: sudo apt install libgtk-3-dev. If the error mentions missing headers, install the corresponding -dev package.

PuTTY opens but can’t connect to any host

This is not usually an installation issue. Check your network connection, firewall settings, and that the remote server is reachable. You can test with ping or telnet host port. Also, ensure you’re using the correct port (default 22 for SSH).

After upgrading Ubuntu, PuTTY stops working

Sometimes a system upgrade can break dependencies. Run sudo apt --fix-broken install to repair any broken packages, then reinstall PuTTY with sudo apt install --reinstall putty.

Frequently Asked Questions

Is PuTTY available for Ubuntu by default?

No, it is not pre-installed. You need to install it manually using one of the methods above.

What is the difference between putty and putty-tools?

The main putty package includes the graphical PuTTY client. The putty-tools package includes command-line utilities like pscp, psftp, plink, and puttygen.

Can I use PuTTY to connect to Windows machines?

PuTTY is primarily for SSH, Telnet, and serial connections. To connect to Windows Remote Desktop (RDP), you would use a different client like Remmina or xfreerdp.

Does PuTTY support SSH keys on Ubuntu?

Yes. You can generate keys with puttygen (from putty-tools) or use existing OpenSSH keys. PuTTY stores private keys in its own .ppk format, so you may need to convert them.

How do I uninstall PuTTY?

To remove the APT-installed version, run sudo apt remove putty. If you want to remove configuration files as well, use sudo apt purge putty. For a source build, remove the files manually or use sudo make uninstall from the source directory.

Is there a Snap or Flatpak version of PuTTY?

Yes, you can install PuTTY via Snap with sudo snap install putty, but the Snap version may have limitations with accessing certain directories. The APT version is generally recommended for most users.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →