Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”

SSH is short for Secure Shell. It is a reliable protocol that provides security for remote login sessions and other network services. The SSH protocol can effectively prevent information leakage during remote management.

XShell is a powerful secure terminal simulation software. It supports SSH, TELNET and other protocols. It can be used in Windows to access servers in different remote systems, so as to achieve remote terminal control.

The XShell legal version is charged. Although the version is provided for students and universities for free, it is still charged for individuals and enterprises to use it. If the XShell learning version is not available, what other software can replace it?

1. Putty

a free SSH and Telnet client.

1.1 introduction of the Putty

Putty is a free and open source connection software that supports SSH, Telnet, and Serial for remote management of Linux servers.

Website: www.chiark.greenend.org.uk/~sgtatham/p…

You can download the client from the official website and select the installation package type

  • . Msi: installation version, used after downloading and installation, about 4M in size after installation
  • Exe: installation-free version, run directly after downloading, the total is about 2M

1.2 Putty Features

Putty is an open source software, is completely free, and can be used in all current Versions of Windows. In addition, Putty has some advantages:

  • The software is small in size, consumes less resources to download and use, and runs fast
  • Download the client without installation, click run to use
  • Supports multiple protocols such as SSH and Talent
  • The operation interface is simple, all functions are concentrated in one interface, easy to use

1.3 How to Use Putty

After you start the Putty software, you can view the following interface, which performs all Putty functions.

As can be seen, if it is a simple remote connection, you only need to select the Session interface on the left and perform the following steps on the right:

  1. Enter the IP address of the server for remote connection. Use the domain name or IP address
  2. Enter the port number for the server
  3. Select a connection type, usually an SSH connection
  4. Optional. If you want to Save the Session information for reuse, you can enter the name of Saved Sessions after the information is filled in, and click Save on the right to Save the Session. The Saved information will be displayed in the box below. You can also import saved Session information or delete unnecessary Session information.
  5. After filling in the information, click the Open button to connect to the remote client
  6. After the connection starts, the command page is displayed, prompting you to enter the user name and password for logging in to the remote server
  7. After the user name and password are verified, the login succeeds, and the server command page is displayed. You can perform other operations

2. MobaXterm

Enhanced terminal for Windows with X11 server, tabbed SSH client, network tools and much more.

2.1 MobaXterm profile

MobaXterm is another excellent SSH client connection tool. Compared to Putty, MobaXterm is an enhanced terminal tool that provides more functionality for users to use.

The MobaXterm installation package is available in either a personal free version or a professional paid version. You can choose the appropriate version according to your work needs

The official download: mobaxterm.mobatek.net/download.ht…

The free version saves fewer sessions and concurrent SSH connections than the professional version, and is sufficient for personal use.

MobaXterm also provides the installation version and the green installation free version of the program, enter the download page to choose.

2.2 MobaXterm characteristics

If you are used to Xshell multi-label mode, you may feel uncomfortable using Putty because Putty does not support multi-label connection mode. Therefore, you need to open the client login again when connecting to another server. MobaXterm provides a good multi-label connection mode, in addition to some other advantages:

  • Support SSH, FTP, serial port, VNC, X server and other protocols connection, powerful
  • Rich interface functions, shortcut keys easy to operate
  • Visual TRANSFER of SFTP files after the server is connected

2.3 Usage of MobaXterm

MobaXterm is also very easy to use. After downloading the software and installing it, open MobaXterm, right-click in the left margin and select New Session to create a connection message.

The operating interface of the software is as follows:

The detailed process can be expressed as:

  1. Right-click and select New Session to create a New connection
  2. On the page that is displayed, select an SSH connection type
  3. Enter the remote IP address and POAT port number. Username is optional
  4. After filling in the information, click OK below to start the connection, and MobaXterm will use a label to connect
  5. If username is not specified, you need to enter the username and password. Otherwise, you only need to enter the password
  6. After successful verification, MobaXterm enters the remote server page and saves the session, which can be viewed in the left column

3. Log in using an SSH key

In actual production scenarios, servers do not provide direct access. To ensure security, SSH keys are used to log in to servers.

It is common to use JumpServer as a jumper to connect to a server. With JumpServer, an open source jumper, JumpServer generates an SSH key for a new user that is required to connect to a remote server locally.

In Xshell, you can choose to use the key to log in and import the key file to complete the login. Putty and MobaXterm also can use SSH key to log in.

3.1 Putty Key Connection

The SSH Key distributed by JumpServer is downloaded as a. Pem file, while the Putty client imports the Key in. PPK format, where PPK is the Putty Private Key, so we first need to convert the Key file into a Putty usable file.

3.1.1 Generating PPK Key Files

If you use the putty.exe client, you need to download a puttygen.exe program to generate the key file, which is also provided on the putty client download page.

If the. Msi installation version of putty is used, the PuttyGen client will be installed during the installation. You can use the puttyGen client directly.

Conversions -> Import Key; puttygen client: Conversions -> Import Key;

After the import is complete, you can enter the encryption character string for the key generation and confirm the character string. Finally, you can use the Save private key command to Save the key to the specified folder.

3.1.2 Login using the PPK Key

After a key file in PPK format is generated and saved, you can use the key to log in to the putty connection page.

  1. During login, you need to enter the IP address and port number on the Session page
  2. Then click Connection -> SSH ->Auth on the left and select the saved key file to import in the right interface
  3. Click Open to connect to the remote server
  4. After the connection starts, you need to enter the login user name information
  5. Log in to the remote server after the user name and imported key file are verified successfully

3.2 MobaXterm Key connection

The connection process of MobaXterm using SSH key is basically the same as that of Putty. The MobaXterm client already provides the key generation function.

3.2.1 Generating a Key File

On the MobaXterm screen, choose Tools -> MobaKeyGen(SSH Key Generator). The key generation screen is displayed, which is the same as that of PuttyGen.

On the key generation page, choose Conversions -> Import key, Import the local PEM file, use the customized encryption string, and Save the private key to generate and Save the key file in the local path.

3.2.2 Login Using a Key

After the key file is generated, we can use the key to log in to the remote client

The connection interface of MobaXterm is shown in the figure. After selecting the SSH connection type, select the Advanced SSH Setting label to configure key information

  • If Use Private key is selected, you can log in using a private key
  • Select the locally generated MobaXterm key file in the right box
  • After filling in all information, click OK below to log in

4. To summarize

Generally speaking, the Putty client is simple and easy to use, with all the basic functions of remote connection, enough for development and use. For a more feature-rich experience, try the MobaXterm client; Both are English interfaces, but do not affect the use of basic functions.