How Mac SSH connects Linux (Ubuntu) GUI graphical interface __linux

Source: Internet
Author: User
Tags ssh


In Windows, many people choose to install Xmanager+xshell, and then remotely connect to Linux, you can directly invoke the GUI interface of the software, easy and convenient.

But a lot of people have not tried to access the GUI of the Linux server by the SH connection on the Mac terminal. The following methods are described below


Brief introduction:

To achieve remote graphics access, you must forward the picture with the help of the X11 protocol. X11 sends the xclient-side image back to the Xserver end. In our process of logging on to a remote server, the Xserver end is the Mac end and Xclient is the Linux server side.

Mac---------------Linux (remote)

|| ||

Xserver xclient





1.

First you need to turn on X11 forwarding on the Linux server side

Take Ubuntu for example

Edit/etc/ssh/sshd_config configuration file

Configure forwarding parameters to Yes

x11forwarding Yes
X11displayoffset 10

Reboot SSH Service

Service SSH Restart

2.

2.1 Edit Mac End of File

/private/etc/ssh/ssh_config

Set to

Forwardx11yes

2.2 Installation Xquartz, online search xquartz. en.softonic.com/Installed by instructions



3. Test

Open Xquartz

Turn on Mac Terminal

ssh-x {user name}@{remote End IP}; (note uppercase X)

Like what

Ssh-x root@192.168.1.192


Login successful, input gvim look, whether can pull out the remote interface




If you feel useful, please point to a wave of attention, O (∩_∩) o Thank you.

Note: If Ssh-x log in, the following error description appears

Xauth key data not generated

You will find that Gvim cannot be opened. This is due to a Mac upgrade, which strengthens security.

Edit Mac under ~/.ssh/config (I use the root user, ordinary users can try their own config file), add the following fields can be.

forwardx11trusted Yes

By the way, remote connection Linux +nvidia graphics card, to follow the bumblebee (Remind yourself)




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.