X11VNC - パスワードが正しいにもかかわらず、間違ったパスワードが原因で接続が失敗する

X11VNC - パスワードが正しいにもかかわらず、間違ったパスワードが原因で接続が失敗する

ブリッジインターフェイスを使用して、Ubuntu Server 20.04の上に仮想マシンとしてXubuntu 20.04を実行します。仮想マシンにSSHで接続できました(Windows 10マシンでPuttyを使用して仮想マシンにアクセスすることもできます)。

Windows 10コンピュータでは、VNCViewer(TigerVNCプロジェクトの一部)を使用して仮想マシンのIPアドレスを入力しました。パスワードを入力する場所にパスワードポップアップが表示され、「接続」をクリックすると

TigerVNC
An unexpected error occurred when communicating with the server:
Authentication failure: password check failed!
Attempt to reconnect?

                                                      [No] [Yes]

私はx11vnc一般的な方法でインストールしましたapt。私が作ったオンライン指示に従ってください。

  • 暗号化されたパスワードファイル

    sudo x11vnc -storepasswd PASSWORD /home/USER/.vnc/passwd
    
  • 暗号化されていないパスワードファイル

    echo PASSWORD > /home/USER/.vnc/password
    

別に処刑しました。

x11vnc -forever -shared -display :0 -rfbauth /home/user/.vnc/passwd

暗号化された場合

x11vnc -forever -shared -display :0 -passwdfile /home/xubuntu/.vnc/passwd

暗号化されていないパスワードファイルの場合。

メモ:もちろん、同時に2つのことをしたわけではありません。また、パスワードの単純さ(例:「abcd」)のため、スペルが間違っていることはほとんどありません。

どちらもSSH端末で次のログを生成しました。

x11vnc -forever -shared -display :0 -passwdfile /home/xubuntu/.vnc/passwd

30/03/2022 10:38:02 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 6641
30/03/2022 10:38:02 Using X display :0
30/03/2022 10:38:02 rootwin: 0x53b reswin: 0x3800001 dpy: 0xc07a6840
30/03/2022 10:38:02
30/03/2022 10:38:02 ------------------ USEFUL INFORMATION ------------------
30/03/2022 10:38:02 X DAMAGE available on display, using it for polling hints.
30/03/2022 10:38:02   To disable this behavior use: '-noxdamage'
30/03/2022 10:38:02
30/03/2022 10:38:02   Most compositing window managers like 'compiz' or 'beryl'
30/03/2022 10:38:02   cause X DAMAGE to fail, and so you may not see any screen
30/03/2022 10:38:02   updates via VNC.  Either disable 'compiz' (recommended) or
30/03/2022 10:38:02   supply the x11vnc '-noxdamage' command line option.
30/03/2022 10:38:02
30/03/2022 10:38:02 Wireframing: -wireframe mode is in effect for window moves.
30/03/2022 10:38:02   If this yields undesired behavior (poor response, painting
30/03/2022 10:38:02   errors, etc) it may be disabled:
30/03/2022 10:38:02    - use '-nowf' to disable wireframing completely.
30/03/2022 10:38:02    - use '-nowcr' to disable the Copy Rectangle after the
30/03/2022 10:38:02      moved window is released in the new position.
30/03/2022 10:38:02   Also see the -help entry for tuning parameters.
30/03/2022 10:38:02   You can press 3 Alt_L's (Left "Alt" key) in a row to
30/03/2022 10:38:02   repaint the screen, also see the -fixscreen option for
30/03/2022 10:38:02   periodic repaints.
30/03/2022 10:38:02
30/03/2022 10:38:02 XFIXES available on display, resetting cursor mode
30/03/2022 10:38:02   to: '-cursor most'.
30/03/2022 10:38:02   to disable this behavior use: '-cursor arrow'
30/03/2022 10:38:02   or '-noxfixes'.
30/03/2022 10:38:02 using XFIXES for cursor drawing.
30/03/2022 10:38:02 GrabServer control via XTEST.
30/03/2022 10:38:02
30/03/2022 10:38:02 Scroll Detection: -scrollcopyrect mode is in effect to
30/03/2022 10:38:02   use RECORD extension to try to detect scrolling windows
30/03/2022 10:38:02   (induced by either user keystroke or mouse input).
30/03/2022 10:38:02   If this yields undesired behavior (poor response, painting
30/03/2022 10:38:02   errors, etc) it may be disabled via: '-noscr'
30/03/2022 10:38:02   Also see the -help entry for tuning parameters.
30/03/2022 10:38:02   You can press 3 Alt_L's (Left "Alt" key) in a row to
30/03/2022 10:38:02   repaint the screen, also see the -fixscreen option for
30/03/2022 10:38:02   periodic repaints.
30/03/2022 10:38:02
30/03/2022 10:38:02 XKEYBOARD: number of keysyms per keycode 7 is greater
30/03/2022 10:38:02   than 4 and 51 keysyms are mapped above 4.
30/03/2022 10:38:02   Automatically switching to -xkb mode.
30/03/2022 10:38:02   If this makes the key mapping worse you can
30/03/2022 10:38:02   disable it with the "-noxkb" option.
30/03/2022 10:38:02   Also, remember "-remap DEAD" for accenting characters.
30/03/2022 10:38:02
30/03/2022 10:38:02 X FBPM extension not supported.
Xlib:  extension "DPMS" missing on display ":0".
30/03/2022 10:38:02 X display is not capable of DPMS.
30/03/2022 10:38:02 --------------------------------------------------------
30/03/2022 10:38:02
30/03/2022 10:38:02 Default visual ID: 0x21
30/03/2022 10:38:02 Read initial data from X display into framebuffer.
30/03/2022 10:38:02 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
30/03/2022 10:38:02
30/03/2022 10:38:02 X display :0 is 32bpp depth=24 true color
30/03/2022 10:38:02
30/03/2022 10:38:02 Autoprobing TCP port
30/03/2022 10:38:02 Autoprobing selected TCP port 5901
30/03/2022 10:38:02 Autoprobing TCP6 port
30/03/2022 10:38:02 rfbListenOnTCP6Port: error in bind IPv6 socket: Address already in use
30/03/2022 10:38:02 Autoprobing selected TCP6 port 5901
30/03/2022 10:38:02 listen6: bind: Address already in use
30/03/2022 10:38:02 Not listening on IPv6 interface.
30/03/2022 10:38:02
30/03/2022 10:38:02 Xinerama is present and active (e.g. multi-head).
30/03/2022 10:38:02 Xinerama: number of sub-screens: 1
30/03/2022 10:38:02 Xinerama: no blackouts needed (only one sub-screen)
30/03/2022 10:38:02
30/03/2022 10:38:02 fb read rate: 230 MB/sec
30/03/2022 10:38:02 fast read: reset -wait  ms to: 10
30/03/2022 10:38:02 fast read: reset -defer ms to: 10
30/03/2022 10:38:02 The X server says there are 10 mouse buttons.
30/03/2022 10:38:02 screen setup finished.
30/03/2022 10:38:02

The VNC desktop is:      SZA-DT043-L-VM0:1
PORT=5901

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

私が気づいた1つは、少なくとも暗号化されていないパスワードファイルを使用して実行するとエラーがx11vnc発生したことです。sudo

30/03/2022 10:46:06 x11vnc version: 0.9.16 lastmod: 2019-01-05  pid: 6708
No protocol specified
30/03/2022 10:46:06 XOpenDisplay(":0") failed.
30/03/2022 10:46:06 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified

30/03/2022 10:46:06 ***************************************
30/03/2022 10:46:06 *** XOpenDisplay failed (:0)

***x11vnc was unable to open the X DISPLAY ":0", it cannot continue
***There may be "Xlib:" error message above with details about the failure

 Some tips and guidelines
 ...

これが私が経験している問題にどのような影響を与えるかはわかりませんが、ここでよりよく知っている人に洞察を提供できると思いました。

社内ネットワークなので、誰かが私のVMに侵入することを心配しません(とにかくワンタイムです)。可能であれば、認証なしでX11VNCを設定してみましょう。しかし、これが機能していても、現在の問題の原因にはまだ興味があります。

ベストアンサー1

このソリューションは非常に面白いです。 TigerVNCビューアを使用しています。明らかにポート5900が必要ですが(デフォルトのVNCポートであることを願っています)、x11vncは常に5901で始まります。私がしなければならなかったのは、ポートを追加することだけでした。他の人がこのような不快感を経験する場合は、<REMOTE_MACHINE_IP_ADDR>:<PORT>5900以外のポートでコンピュータに接続してください。

おすすめ記事