Graphical interface for SSH client connection in Ubuntu

Source: Internet
Author: User
Tags ssh server

In Windows, if you use SSH to connect to the server, Putty is a small and practical tool. If you want a graphical interface, you can use the X tool with putty. Or you can directly use xmanager enterprise, which is not very convenient.

In ubuntu, the SSH client is generally provided. If no sudo apt-Get install OpenSSH-client can be executed, run PS-E | grep ssh. If there is an SSH-agent, the SSH client is successfully installed. On the terminal, you can enter the SSH username@192.168.1.100 to log on to the SSH server 192.168.1.100, and then you will be asked to enter the password, and then you will log on.

After the SSH connection is successful, you need to make some configuration if you want to display the graphic interface. The procedure is as follows:

1. The server-side SSH server must run the forward X interface. On the SSH server, find the configuration file/etc/ssh/sshd_config, which contains a line x11forwarding yes, make sure that this is yes (note that # In this configuration file is a comment, make sure that x11forwarding is not followed by # comment), and then restart the SSH service, CD/etc/init. d. Run the command in this directory. /ssh restart

2. Configure the client. In the/etc/ssh/ssh_config configuration file, find forwardagent Yes, forwardx11 yes, forwardx11trusted Yes (note that # In this configuration file is a comment to ensure that the modified row is not commented out)

3. After the configuration is complete, enter the terminal. now assume that the IP address of our Ubuntu client is 1.1.1.1 (only assumed), and the IP address of the SSH server is 2.2.2.2. The following is the procedure. Do not make a mistake:

First, before the terminal is connected to SSH, execute xhost + 2.2.2.2 to allow cross-border connection from the SSH server.

Then execute ssh-x root@2.2.2.2 note-x This is capital X, this step is to connect to the SSH server, then you will need to enter the password

At this time, the terminal has been connected to the SSH server, and then execute export display = 1.1.1.1: 0.0 to re-locate the X Display of the SSH server to the 0.0 display of 1.1.1.1, that is, our client.

Then perform a test, execute xclock, and wait... If a clock interface appears on your Ubuntu interface at this time, congratulations.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.