PuTTY on Ubuntu
Installation, configuration, and usage guide for Ubuntu Linux
Introduction: PuTTY Usage on Linux Systems
While PuTTY is primarily designed for Windows, it's also available on Linux systems including Ubuntu. However, most Ubuntu users prefer native SSH clients since Linux has built-in SSH support through OpenSSH.
Note: Ubuntu comes with OpenSSH pre-installed, which is often sufficient for most users. PuTTY is mainly useful if you need its specific features or are transitioning from Windows.
Installation via Terminal
Method 1: Using apt (Recommended)
# Update package list
$ sudo apt update
# Install PuTTY and related tools
$ sudo apt install putty putty-tools -y
# Verify installation
$ putty --version
This installs:
- putty: The main GUI application
- plink: Command-line SSH client
- pscp: Secure copy tool (like scp)
- psftp: Secure FTP client
- puttygen: Key generation tool
- pageant: SSH authentication agent
Method 2: Using Snap
# Install via snap
$ sudo snap install putty-jamesodhunt
# Launch
$ putty-jamesodhunt.putty
Method 3: Build from Source
# Install dependencies
$ sudo apt install build-essential git libgtk-3-dev
# Clone repository
$ git clone https://git.tartarus.org/simon/putty.git
$ cd putty
# Build
$ ./mkfiles.pl
$ make -f Makefile.gtk
# Run
$ ./unix/plink
Launching PuTTY GUI
From Terminal
# Launch PuTTY GUI
$ putty
# Or launch in background
$ putty &
# Open specific session
$ putty -load "SessionName"
From Application Menu
- Click "Show Applications" (9 dots icon)
- Search for "PuTTY"
- Click the PuTTY icon to launch
SSH Connection Example
Using PuTTY GUI
- Launch PuTTY:
$ putty
- Enter hostname or IP address
- Set port (default: 22)
- Select connection type: SSH
- Click "Open"
- Enter username and password
Using plink (Command-line)
# Basic connection
$ plink user@hostname
# With password
$ plink user@hostname -pw yourpassword
# With SSH key
$ plink user@hostname -i /path/to/private-key.ppk
# Execute command
$ plink user@hostname "ls -la"
Alternatives to PuTTY on Ubuntu
OpenSSH (Built-in, Recommended)
Ubuntu comes with OpenSSH client pre-installed. It's more powerful and native to Linux:
# Basic SSH connection
$ ssh user@hostname
# With specific port
$ ssh user@hostname -p 2222
# With SSH key
$ ssh -i ~/.ssh/id_rsa user@hostname
# Copy files (SCP)
$ scp file.txt user@hostname:/remote/path/
# SFTP
$ sftp user@hostname
# SSH tunnel (port forwarding)
$ ssh -L 3307:localhost:3306 user@hostname
# Keep connection alive
$ ssh -o ServerAliveInterval=60 user@hostname
GNOME Terminal + SSH
Use Ubuntu's default terminal with SSH:
- Already installed by default
- Tabbed interface
- Custom profiles for different servers
- Better Unicode support
Tilix (Advanced Terminal)
# Install Tilix
$ sudo apt install tilix
# Launch
$ tilix
Features:
- Tiling terminal windows
- Multiple panes
- Session management
- Quake mode (dropdown terminal)
Terminator
# Install
$ sudo apt install terminator
# Launch
$ terminator
Features:
- Multiple terminal panes
- Custom layouts
- Broadcast input to multiple terminals
- Plugin support
Remmina (Remote Desktop Manager)
# Install
$ sudo apt install remmina remmina-plugin-ssh
# Launch
$ remmina
Features:
- SSH, RDP, VNC support
- Connection profiles
- GUI interface
- Session management
SSH Key Management on Ubuntu
Generate SSH Keys (OpenSSH)
# Generate RSA key
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# Generate ED25519 key (recommended)
$ ssh-keygen -t ed25519 -C "your_email@example.com"
# Keys saved to ~/.ssh/id_ed25519 and ~/.ssh/id_ed25519.pub
Generate Keys with PuTTYgen
# Launch PuTTYgen
$ puttygen
# Or command-line
$ puttygen -t rsa -b 4096 -o mykey.ppk
Convert OpenSSH Key to PuTTY Format
# Convert private key
$ puttygen ~/.ssh/id_rsa -o mykey.ppk -O private
# Convert public key
$ puttygen ~/.ssh/id_rsa -o mykey.pub -O public
Copy Public Key to Server
# Automated copy
$ ssh-copy-id user@hostname
# Manual copy
$ cat ~/.ssh/id_ed25519.pub | ssh user@hostname "cat >> ~/.ssh/authorized_keys"
# Test connection
$ ssh user@hostname
SSH Config File (~/.ssh/config)
Create SSH shortcuts for easy connection:
# Create/edit config file
$ nano ~/.ssh/config
# Add entries:
Host webserver
HostName 192.168.1.100
User admin
Port 22
IdentityFile ~/.ssh/id_ed25519
Host database
HostName db.example.com
User dbadmin
Port 2222
IdentityFile ~/.ssh/db-key
# Now connect easily:
$ ssh webserver
$ ssh database
Troubleshooting on Ubuntu
PuTTY Won't Launch
Solutions:
- Check if installed:
$ which putty
- Reinstall:
$ sudo apt reinstall putty
- Check display:
$ echo $DISPLAY
(should show :0 or similar) - Try running from terminal to see error messages
Permission Denied (publickey)
# Check SSH key permissions
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/id_ed25519
$ chmod 644 ~/.ssh/id_ed25519.pub
# Verify key is added to ssh-agent
$ ssh-add -l
# Add key if needed
$ ssh-add ~/.ssh/id_ed25519
Connection Timeout
# Test network connectivity
$ ping hostname
# Test if SSH port is open
$ nc -zv hostname 22
# Try verbose SSH connection
$ ssh -vvv user@hostname
Best Practices for Ubuntu
- ✅ Use OpenSSH instead of PuTTY for better Linux integration
- ✅ Configure ~/.ssh/config for connection shortcuts
- ✅ Use ssh-agent to manage keys
- ✅ Set up key-based authentication
- ✅ Use tmux or screen for persistent sessions
- ✅ Enable SSH multiplexing for faster connections
- ✅ Use modern terminal emulators (Tilix, Terminator)
- ❌ Avoid storing passwords in plain text
- ❌ Don't use root login directly (use sudo instead)
Quick Command Reference
# OpenSSH Commands
$ ssh user@host # Connect to server
$ ssh -p 2222 user@host # Custom port
$ ssh -i key.pem user@host # With key
$ scp file user@host:/path # Copy file to server
$ scp user@host:/path/file . # Copy file from server
$ sftp user@host # Interactive SFTP
$ ssh user@host 'command' # Run remote command
# PuTTY Commands
$ putty & # Launch GUI
$ plink user@host # Command-line SSH
$ pscp file user@host:/path # Secure copy
$ psftp user@host # SFTP client
$ puttygen -t rsa -o key.ppk # Generate key
# Key Management
$ ssh-keygen -t ed25519 # Generate key
$ ssh-copy-id user@host # Copy public key
$ ssh-add ~/.ssh/id_ed25519 # Add to agent
$ ssh-add -l # List loaded keys