Text
How to Install PuTTY on Ubuntu Linux

Introduction
PuTTY is a popular terminal emulator for Windows, but it is not only limited to Windows operating system. Being free and open source, it is popular among Linux users too.
PuTTY supports a wide range of protocols such as serial, SSH, Telnet, rlogin, SCP, SFTP etc. PuTTY is used by seasoned sysadmins and hobbyists/maker-crowd alike.
PuTTY ships with a command line tool named “psftp”, the PuTTY SFTP client, which is used to securely transfer files between computers over an SSH connection.
Sysadmins generally use PuTTY as an SSH and telnet client whereas the Maker community widely uses PuTTY for interfacing with the serial ports on their hardware.
The simplest way to install PuTTY in Ubuntu Linux is via terminal i.e, the command line.
Follow the steps below to install PuTTY on Ubuntu.
Step 1
Login into Ubuntu Desktop. Press Ctrl + Atl + T to open GNOME terminal. If for some reason the shortcut didn’t work, run the Terminal from the Ubuntu Dash.
Step 2
Run the following command in the terminal.
>> sudo apt-get update

This command updates the Ubuntu package list with latest one. If this command is skipped, there is a good chance that Ubuntu might install older version of the softwares instead of the latest version due to the fact that it only had the older list with older version of softwares.
So, whenever installing new software or intending to upgrade the software versions, it is a good idea to run this command first.
The sudo prefix at the start of the command instructs the terminal to run the command as root since installing and upgrading softwares is a privilege operation and should not be performed by users which do not have sufficient access.
Provide the user password when prompted by sudo and hit Enter.
Step 3
Install PuTTY using the command below.
>> Sudo apt-get install -y putty

Step 4
PuTTY should be installed. Run it from the terminal using “putty” as a command, or from the Dash.
>> putty

As visible in the PuTTY screenshot above, it provides a range of connection types to choose from Raw, Telnet, Rlogin, SSH, and Serial.
It also ships with command-line tools for SCP (pscp), SFTP (psftp), RSA and DSA key generator (putty keygen), etc, which can be run from the terminal.
Connecting to Ubuntu Server using SSH Keys and Putty:
This tutorial shows you how to connect to your Ubuntu server using ssh with keys. The advantage is that you can connect to your server without passwords. .
First, install an SSH server on the server if not already installed:
sudo apt-get install ssh Open SSH-server
For increased security change the SSH port to something else (Eg. 2222) by editing /etc/ssh/sshd_config (optional). The default port (22) would work as well. sudo nano /etc/ssh/sshd_config
Save and restart the server:
sudo /etc/init.d/ssh restart
Then navigate to the following folder:
cd ~/.ssh
Generate a pair of keys:
ssh-keygen -t dsa
You could also use "RSA" instead of "dsa". When asked for a file name you may provide a file name for the keys (Eg. passkey) or just press enter for default naming.
You may also choose to enter a passphrase for increased security (recommended). However, remember that you will have to enter this passphrase every time to connect to the ssh server.
Then create a key file as described below and set its permissions:
touch authorized_keys chmod 600 authorized_keys
Then add the public key (Eg. passkey.pub) to the key file:
cat passkey.pub >> authorized_keys
Then for security remove the passkey.pub from the server. Now login to your other computer and move the other key (Eg. passkey) to this computer. In Ubuntu,
you can copy the private key (passkey) to the .ssh folder in your home directory. In Windows, you can copy it to any folder.
In Ubuntu/Linux edit ~/.ssh/config file to use the private key for connections.
In Windows, use PuTTYgen.exe to load the passkey to generate a private key file. Use this key file while connecting to a remote ssh server using Putty.
1 note
·
View note