如何在 Ubuntu 和其他 Linux 发行版上安装 Putty
putty ssh
如果我没弄错，[Putty](https://www.putty.org/) 可能是 Windows 最受欢迎的 SSH 客户端。


在 IT 公司中，开发环境通常在远程 Linux 系统上，而开发人员则使用 Windows 作为本地系统。Putty 用于从 Windows 机器连接到远程 Linux 系统。


Putty 不是限定于 Windows 的。你也可以在 Linux 和 macOS 上使用此开源软件。


但是等等！当你已经拥有“真正的” Linux 终端时，为什么要在 Linux 上使用单独的 SSH 客户端？这有几个想在 Linux 上使用 Putty 的原因。


* 你在 Windows 上使用 Putty 已经很久了，你觉得它更舒服。
* 你发现很难手动编辑 SSH 配置文件以保存各种 SSH 会话。你更喜欢 Putty 图形化保存 SSH 连接的方式。
* 你想通过连接到原始套接字和串口进行调试。


无论是什么原因，如果你想在 Ubuntu 或任何其他 Linux 上使用 Putty，你当然可以这样做。让我告诉你如何做到。


### 在 Ubuntu Linux 上安装 Putty


![Installing Putty on Linux](/data/attachment/album/201812/22/181610el1fv5kt7lzee3bd.png)


对于 Ubuntu 用户来说，好消息是 Putty 可以在 Ubuntu 的 universe 仓库中找到。


要在 Ubuntu上安装 Putty，首先应确保已启用 universe 仓库。



```
sudo add-apt-repository universe
```

启用 universe 仓库后，应使用以下命令更新 Ubuntu：



```
sudo apt update
```

之后，你可以使用以下命令安装 Putty：



```
sudo apt install putty
```

安装后，你可以在菜单中找到它来启动 Putty。


正如你在下面的截图中看到的，Putty 的 Linux 版本看起来与 Windows 版本相同。这让你松了一口气, 因为你不必再尝试新的设置。


![Putty in Linux](/data/attachment/album/201812/22/181611vsvq4p4e49ev11dg.jpg)


当你输入远程系统的[主机名](https://itsfoss.com/change-hostname-ubuntu/)或 IP 地址并连接到它时，Putty 将使用你已保存在主目录中的 SSH 密钥。


![Using Putty in Ubuntu Linux](/data/attachment/album/201812/22/181612azmiibaq00sqhsbi.jpg)


### 在其他 Linux 发行版上安装 Putty


[Putty 可用于 Debian](https://packages.debian.org/jessie/putty)，所以你只需要使用 `apt-get` 或 `aptitude` 来安装它。



```
sudo apt-get install putty
```

Putty 也适用于 Fedora/Red Hat，并可以使用默认的包管理器进行安装。



```
sudo dnf install putty
```

你还可以在基于 Arch Linux 的发行版中轻松安装 Putty。



```
sudo pacman -S putty
```

请记住，Putty 是一款开源软件。如果你真的想要，你也可以通过源代码安装它。你可以从下面的链接获取 Putty 的源代码。


* [下载 Putty 源代码](https://www.chiark.greenend.org.uk/%7Esgtatham/putty/latest.html)


我一直喜欢原生 Linux 终端而不是像 Putty 这样的 SSH 客户端。我觉得 GNOME 终端或 [Terminator](https://launchpad.net/terminator) 更有家的感觉。但是，在 Linux 中使用默认终端或 Putty 是个人选择。


你在 Linux 上管理多个 SSH 连接时使用了什么？




---


via: <https://itsfoss.com/putty-linux/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

If I am not wrong, [Putty](https://www.putty.org/?ref=itsfoss.com) is perhaps the most popular SSH client for Windows operating systems.

In IT companies, the development environment is usually on a remote Linux system while the developers use Windows as their local system. Putty is used for connecting to the remote Linux system from the Windows machine.

Putty is not limited to Windows only. You can also use this open source software on Linux and macOS.

But wait! Why would you use a separate SSH client on Linux when you already have plenty of ‘real’ [Linux terminals](https://itsfoss.com/linux-terminal-emulators/) with you? There are several reasons why you would want to use Putty on Linux.

- You have used Putty for so long on Windows that you are more comfortable with it.
- You find it difficult to manually edit
[SSH config file](https://linuxhandbook.com/ssh-config-file/?ref=itsfoss.com)to save the various SSH sessions. You prefer Putty’s graphical way of storing SSH connection. - You want to debug by connecting to raw sockets and serial ports.

Whatever may be the reason, if you want to **use Putty on Ubuntu** or any other Linux, you can certainly do so. Let me show you how to do that.

## Installing Putty on Ubuntu Linux

![Installing Putty on Linux](https://itsfoss.com/content/images/wordpress/2018/12/Putty-linux-800x450.png)

The good news for Ubuntu users is that Putty is available in the universe repository of Ubuntu.

To install Putty on Ubuntu, you should first make sure that the [universe repository is enabled](https://itsfoss.com/ubuntu-repositories/).

`sudo add-apt-repository universe`


Once you have the universe repository enabled, you should update Ubuntu with this command:

`sudo apt update`


After this, you can install Putty with this command:

`sudo apt install putty`


Once installed, you can start Putty by finding it in the menu.

As you can see in the screenshot below, the Linux version of Putty looks the same as the Windows version. That’s a relief because you won’t have to fiddle around trying to find your way through new and changed settings.

![Putty in Linux](https://itsfoss.com/content/images/wordpress/2018/12/putty-interface-ubuntu-800x503.jpeg)

When you enter the remote system’s [hostname](https://itsfoss.com/change-hostname-ubuntu/) or IP address and connect to it, Putty will utilize the already saved SSH keys in your home directory. It’s quite good at SSH key management.

![Using Putty in Ubuntu Linux](https://itsfoss.com/content/images/wordpress/2018/12/putty-interface-ubuntu-1-800x430.jpeg)

## Installing Putty on other Linux distributions

[Putty is available for Debian](https://packages.debian.org/jessie/putty?ref=itsfoss.com) so you just need to use apt-get or aptitude for installing it.

`sudo apt install putty`


Putty is also available for Fedora/Red Hat and can be installed using the default package manager.

`sudo dnf install putty`


You can also easily install Putty in Arch Linux based distributions.

`sudo pacman -S putty`


Remember that Putty is an open source software. You can also install it via source code if you really want to. You can download its source code from the link below.

## Learn the extra bits

If you are new to the whole terminal thing, I highly recommend reading this guide. You'll learn many useful things.

[19 Basic But Essential Linux Terminal Tips You Must KnowLearn some small, basic but often ignored things about the terminal. With the small tips, you should be able to use the terminal with slightly more efficiency.](https://itsfoss.com/basic-terminal-tips-ubuntu/)![](https://itsfoss.com/content/images/wordpress/2021/12/ubuntu-terminal-basic-tips.png)


![](https://itsfoss.com/content/images/wordpress/2021/12/ubuntu-terminal-basic-tips.png)

Knowing the [essential Linux commands](https://itsfoss.com/essential-ubuntu-commands/) will also help you a great deal.

[31 Basic Yet Essential Ubuntu CommandsAn extensive list of essential Linux commands that every Ubuntu user will find helpful in their Linux journey.](https://itsfoss.com/essential-ubuntu-commands/)![](https://itsfoss.com/content/images/wordpress/2022/11/must-know-linux-commands-for-ubuntu-user.png)


![](https://itsfoss.com/content/images/wordpress/2022/11/must-know-linux-commands-for-ubuntu-user.png)

I would always prefer the native Linux terminal over an SSH client like Putty. I feel more at home with the GNOME terminal or [Terminator](https://launchpad.net/terminator?ref=itsfoss.com). However, it’s up to an individual’s choice to use the default terminal or Putty in Linux.

What do you use for managing multiple SSH connections on Linux?