PuTTY: The popular free and open-source terminal emulator
Sun May 17 3:20 pm EDT 2026xtmci@atomicmail.io
Table of Contents
- How to paste text from Windows clipboard to PuTTY terminal
- PuTTY command line options
- PuTTY public key authentication
How to paste text from Windows clipboard to PuTTY terminal
Method 1Right-click your mouse anywhere inside the PuTTY terminal.Method 2Use the keyboard shortcutAlt + Shift + Insert.
Move your cursor to a position which you want to paste the text into. Right-clicking your mouse there should paste it after the cursor.
Alternatively, use the keyboard shortcut Alt + Shift + Insert rather than clicking the mouse. Sometimes, Shift + Insert will do the same job instead.
In the case of copying text to the clipboard rather than pasting from it, do the following. First, highlight the text you want to copy with your mouse, then, left-click the mouse.
PuTTY command line options
The -load switch applies a saved session to the current connection:
putty.exe -load session_name username@domain.com
The -i option specifies an SSH private key file for authentication:
putty.exe -i private_key_file.ppk username@domain.com
The -P switch specifies a port number for the current connection:
putty.exe -P port_number username@domain.com
The -pw option provides the program with a password for the login:
putty.exe -pw password username@domain.com
PuTTY public key authentication
- Generate a public and private key pair.
- Register the public key on the server.
- Log in to the server using the private key.
Run puttygen.exe program from the Command Prompt or the File Explorer. (You can download the puttygen.exe file from the PuTTYgen homepage.)
Select RSA for the type of key. Click Generate. Move your mouse freely over the blank area to speed up the key generation process.
Select the newly generated public key with your mouse and copy it. Click Save private key to save your private key as a file with .ppk extension. Keep this file in a safe place.
Log in to your server. Create .ssh directory in your home directory and set desired permissions:
mkdir ~/.ssh
chmod 700 ~/.ssh
Go to .ssh directory. Create authorized_keys file and set the permissions:
cd ~/.ssh
touch authorized_keys
chmod 600 authorized_keys
Open the authorized_keys file:
vim authorized_keys
Paste the public key you've copied earlier into the file as a single line:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmilaYkSS8uI14a22rNZVo2pJqlMuyNBE75q/tgYMWrcqjiV2Ve/HUE8aJOswO+Ytp3IYYyNT8IPs9D70tAZNhslx7o29pVGEcek+koGGYIc0m6ekvZucT+CdYGZ/H52dOAusCvRrxBmxyDHFraQlb0oATqW2Xsew5EZ65PpYA4moa9LrG16EsqDKTqXz3Ej1gooAlUUeGbU53YvsdSyX7zAXyBqZKCC5UqCwl1SlVmstbswDM+r7NjL6rGao6l6NitfBfYyrLG7OuV9UVxUA2g2IHbfsXppy/NV4xSuiLKDoynXUvF9mrpupILNsptbT3/JMnyljkHVGmZSFUNBkb rsa-key-19991231
Save and exit the file.
Now, you can login to your server through the public key authentication.
Open the Command Prompt and use putty.exe program. To specify your private key file, you can use -i switch as shown below:
putty.exe -i your_private_key.ppk user@domain.com