.png、.jpeg、 ...)。.bmp我正在使用 Ubuntu 连接到 VPS,我需要知道图像文件在更新后是否发生变化,因此我需要通过 ssh 打开/显示图片。
我怎样才能做到这一点?
如果您想使用 GUI 应用程序ssh,则需要使用-X或-Y选项(使用-Y):
-X Enables X11 forwarding. This can also be specified on a per-host
basis in a configuration file.
X11 forwarding should be enabled with caution. Users with the
ability to bypass file permissions on the remote host (for the
user's X authorization database) can access the local X11 display
through the forwarded connection. An attacker may then be able
to perform activities such as keystroke monitoring.
For this reason, X11 forwarding is subjected to X11 SECURITY
extension restrictions by default. Please refer to the ssh -Y
option and the ForwardX11Trusted directive in ssh_config(5) for
more information.
-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not
subjected to the X11 SECURITY extension controls.
Run Code Online (Sandbox Code Playgroud)
因此,例如,要用于eog在 处显示远程图像/path/to/file.png,您可以这样做
ssh -Y liarez@remote.host eog /path/to/file.png
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13766 次 |
| 最近记录: |