我正在尝试使用Ubuntu 16上的Websockify在本地家庭沙箱上通过https访问noVNC - > https://ubuntu:6080/vnc.html?host=ubuntu&port=6080
到目前为止的步骤:
1.Self签署了一份在我的localhost上进行测试的证书,即使它通过证书的https b / c有一条红线,我也可以访问该证书。
2.Downloaded最新noVNC和websockify。
3.在noVNC的utils目录中放置websockify。
如果我通过launch.sh运行noVNC:
utils/launch.sh --vnc localhost:5901 --cert ./lib/
lib有自签名.key,.pem和.csr,我的bash读取:
Starting webserver and WebSockets proxy on port 6080
WARNING: no 'numpy' module, HyBi protocol will be slower
WebSocket server settings:
- Listen on :6080
- Flash security policy server
- Web server. Web root: /home/testuser/app/novnc
- SSL/TLS support
- proxying from :6080 to localhost:5901
Navigate to this URL:
http://ubuntu:6080/vnc.html?host=ubuntu&port=6080
Press Ctrl-C to exit
当我访问我的浏览器并加载上面显示的网址时,我会看到vnc.html页面。但是,当我输入https而不是http(我的原始要求)时,我收到以下错误:
*handler exception: [Errno 336265225] _ssl.c:355: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib*
进一步审核后,我发现SO post将同一错误指向python问题,可以使用verify = False进行补救。然而,在我走下一个兔子洞之前,我一无所知,我以为我会问是否有人知道为什么我不能通过https访问noVNC?
答案 0 :(得分:1)
您的命令包含参数--cert ./lib/
,其中/ lib /是目录。
根据man websockify
,您应该使用以下选项:
--cert=CERT SSL certificate file
--key=KEY SSL key file (if separate from cert)