Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use PuTTY in Linux

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Xiaobian to share with you how to install and use PuTTY in Linux, I believe most people still do not know how, so share this article for everyone's reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

PuTTY is a free and open source GUI client that supports multiple protocols including SSH, Telnet and Rlogin. Typically, Windows administrators use PuTTY as an SSH or Telnet client to establish connections between local Windows systems and remote Linux servers. PuTTY, however, is not Windows exclusive. It is also popular among Linux users.

Installing PuTTY in Linux

PuTTY is included in the official sources of many Linux distributions. For example, in Arch Linux we can install PuTTY with this command:

$ sudo pacman -S putty

Install it in Debian, Ubuntu or Linux Mint:

$ sudo apt install putty Access remote Linux servers using PuTTY

After PuTTY is installed, you can open it in the menu or launcher. If you want to use the terminal to open it, it is also possible:

$ putty

PuTTY's default interface looks like this:

PuTTY default interface

As you can see, many of the options come with descriptions. In the left panel, you can configure many items, such as:

HarmonyOS Technology Community

Modify PuTTY login session options;

Modify terminal simulator control options to control the function of each key;

control the ringing sound of the terminal;

Enable/disable advanced features of the terminal;

Set PuTTY window size;

Control command rollback length (default is 2000 lines);

Modify the appearance of PuTTY windows or cursors;

Adjust window edges;

Adjust font;

save login information;

Set up proxy;

Modify control options for each protocol;

And more.

All options are basically annotated, I believe you understand it is not difficult.

Using PuTTY to access remote Linux servers

Click the "Session" tab on the left panel and enter the remote hostname (or IP address). Then, select the connection type (such as Telnet, Rlogin, SSH, etc.). Depending on the connection type you choose, PuTTY will automatically select the default port number for the connection type (e.g. SSH is 22, Telnet is 23). If you change the default port number, don't forget to enter it manually into the "Port" field. Here, I connect to the remote host using SSH. After entering all the information, click "Open."

connect through SSH

If this is your first time connecting to this remote host, PuTTY will display a security warning asking if you trust the remote host you are connecting to. Click "Accept" to add the remote host's key to PuTTY's cache:

PuTTY Safety Warning

Next, enter the username and password for the remote host. Then you successfully connect to the remote host.

Connected to remote host

Using key authentication to access remote hosts

Some Linux administrators may have configured key authentication on the server. For example, when accessing AMS instances with PuTTY, you need to specify the location of the key file. PuTTY can use its own format (.ppk file) for public key verification.

Enter the hostname or IP first. Then, in the Category tab, expand Connection, expand SSH, select Auth, and select the.ppk key file.

Click "Accept" to turn off the safety alert. Then, enter the password of the remote host (if the key is password protected) to establish the connection.

Save PuTTY session

Sometimes, you may need to connect to the same remote host multiple times. You can save these sessions and access them later without entering information.

Enter a hostname (or IP address) and provide a session name, then click Save. If you have key files, make sure you specify them before clicking the Save button.

You can now initiate the connection by selecting "Saved sessions" and clicking "Load" and then clicking "Open."

Use PuTTY Secure Copy Client (pscp) to transfer files to remote hosts

Typically, Linux users and administrators use scp, a command-line tool to transfer files from local to remote hosts. PuTTY does provide us with a tool called PuTTY Secure Copy Client (pscp) to do just that. If your local host is running Windows, you may need this tool. PSCP is available under both Windows and Linux.

Use this command to copy file.txt from Arch Linux locally to Ubuntu remotely:

pscp -i test.ppk file.txt sk@192.168.225.22:/home/sk/

Let's analyze this command:

-i test.ppk: Access the key file used by the remote host;

file.txt: The file to copy to the remote host;

sk@192.168.225.22: username and IP of remote host;

/home/sk/: destination path.

To copy a directory, use the-r (Recursive) argument:

pscp -i test.ppk -r dir/ sk@192.168.225.22:/home/sk/

To transfer files using pscp, execute the following command:

pscp -i test.ppk c:\documents\file.txt.txt sk@192.168.225.22:/home/sk/

You should now know what PuTTY is, how to install it, and how to use it. You also learned how to transfer files between local and remote hosts using the pscp program.

That's all for "How to install and use PuTTY in Linux", thanks for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report