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)